Home
last modified time | relevance | path

Searched refs:annotations (Results 1 – 25 of 205) sorted by relevance

123456789

/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiTypePrinter.kt90 annotations: Array<PsiAnnotation>, in <lambda>()
94 val nullable = getNullable(annotations, elementAnnotations) in <lambda>()
158 val annotations = type.annotations in <lambda>() constant
159 if (annotations.isEmpty() && suffix == null) return "?" in <lambda>()
162 appendAnnotations(sb, annotations, elementAnnotations) in <lambda>()
187 val annotations = type.annotations in <lambda>() constant
188 if (annotations.isNotEmpty()) { in <lambda>()
189 appendAnnotations(sb, annotations, null) in <lambda>()
212 val annotations = type.annotations in <lambda>() constant
214 if (annotations.isNotEmpty()) { in <lambda>()
[all …]
DPsiModifierItem.kt46 annotations: MutableList<AnnotationItem>? = null
47 ) : DefaultModifierList(codebase, flags, annotations), ModifierList, MutableModifierList {
161 val psiAnnotations = modifierList.annotations in create()
165 val annotations: MutableList<AnnotationItem> = in create() constant
182 PsiModifierItem(codebase, flags, annotations) in create()
193 val uAnnotations = annotated.annotations in create()
196 val psiAnnotations = modifierList.annotations in create()
198 val annotations: MutableList<AnnotationItem> = in create() constant
200 PsiModifierItem(codebase, flags, annotations) in create()
207 val annotations: MutableList<AnnotationItem> = uAnnotations in create() constant
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/doclava1/
DApiFile.java35 import com.google.common.annotations.VisibleForTesting;
39 import org.jetbrains.annotations.Nullable;
127 List<String> annotations = getAnnotations(tokenizer, token); in parsePackage() local
129 if (annotations != null) { in parsePackage()
130 modifiers.addAnnotations(annotations); in parsePackage()
165 List<String> annotations = getAnnotations(tokenizer, token); in parseClass() local
168 TextModifiers modifiers = parseModifiers(api, tokenizer, token, annotations); in parseClass()
207 rawName, annotations); in parseClass()
277 …>> processKotlinTypeSuffix(TextCodebase api, String type, List<String> annotations) throws ApiPars… in processKotlinTypeSuffix() argument
281 annotations = mergeAnnotations(annotations, ANDROIDX_NULLABLE); in processKotlinTypeSuffix()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextModifiers.kt33 annotations: MutableList<AnnotationItem>? = null in <lambda>()
34 ) : DefaultModifierList(codebase, flags, annotations) { in <lambda>()
37 val annotations = this.annotations in <lambda>() constant
39 if (annotations == null || annotations.isEmpty()) { in <lambda>()
42 annotations.toMutableList() in <lambda>()
53 val annotations = ArrayList<AnnotationItem>(annotationSources.size) in <lambda>() constant
77 annotations.add(item) in <lambda>()
79 this.annotations = annotations in <lambda>()
/tools/metalava/stub-annotations/
DREADME.md3 The annotations in these packages are used to compile
4 the stubs. They are mostly identical to the annotations
7 (1) There are some annotations here which are not in
11 with null/non-null. We do *not* want these annotations
14 of the normal null annotations.
16 (2) There are some annotations in the support library
20 (3) Only class retention annotations are interesting for
25 library annotations; some of them were accidentally
28 (5) We've tweaked the nullness annotations to include
34 "apis" field used for merged historical annotations
[all …]
/tools/metalava/
DAndroid.bp34 name: "stub-annotations",
37 "stub-annotations/src/main/java/**/*.java",
50 name: "private-stub-annotations",
56 "stub-annotations/src/main/java/**/*.java",
58 cmd: "($(location metalava) --no-banner --copy-annotations tools/metalava/stub-annotations " +
59 …"$(genDir)/private-stub-annotations) && ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)…
61 "private-stub-annotations.srcjar",
66 name: "private-stub-annotations-jar",
69 ":private-stub-annotations",
DFORMAT.md17 format adds new information, such as annotations, parameter names and default
21 3. This is format v2, but will all nullness annotations replaced by a
24 in format v2, but it was deferred since type-use annotations introduces
34 developers), we'd like to have nullness annotations (as well as some other
35 annotations) be a formal part of the SDK.
37 That means the annotations should be part of the signature files too -- such
71 The new signature format now includes annotations; not all annotations (such as
73 annotations, etc.
86 (Notice how the annotations are not using fully qualified name; that's discussed
89 The annotations to be included are annotations for annotation types that are not
[all …]
DREADME.md14 annotations.
16 * Extracting source level annotations into external annotations file (such as
17 the typedef annotations, which cannot be stored in the SDK as .class level
18 annotations).
41 signature files, the SDK stub files, external annotations etc.
79 * Ability to merge in data (annotations etc) from external sources, such as
80 IntelliJ external annotations data as well as signature files containing
81 annotations. This isn't just merged at export time, it's merged at codebase
90 instead of "abstract class extends java.lang.Enum", annotations as
97 * Add support for writing (and reading) annotations into the signature
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DModifierList.kt32 fun annotations(): List<AnnotationItem> in annotations() method
85 return annotations().any { it.isNonNull() || it.isNullable() } in hasNullnessInfo()
90 return annotations().any { it.isNullable() } in isNullable()
101 return annotations().any { in hasShowAnnotation()
115 return annotations().any { in hasShowSingleAnnotation()
128 return annotations().any { in hasHideAnnotations()
141 return annotations().firstOrNull { in findAnnotation()
480 var annotations = list.annotations() in writeAnnotations() variable
483 if (annotations.size > 2) { in writeAnnotations()
484 annotations = annotations.sortedBy { it.qualifiedName() } in writeAnnotations()
[all …]
DDefaultModifierList.kt25 protected open var annotations: MutableList<AnnotationItem>? = null variable in com.android.tools.metalava.model.DefaultModifierList
41 override fun annotations(): List<AnnotationItem> { in annotations() method
42 return annotations ?: emptyList() in annotations()
214 if (annotations == null) { in addAnnotation()
215 annotations = mutableListOf() in addAnnotation()
217 annotations?.add(annotation) in addAnnotation()
221 annotations?.remove(annotation) in removeAnnotation()
225 annotations?.clear() in clearAnnotations()
/tools/metalava/src/test/java/com/android/tools/metalava/model/psi/
DPsiTypePrinterTest.kt179 fun `Test merge annotations`() { in <lambda>()
244 fun `Check other annotations than nullness annotations`() { in <lambda>()
818 fun handleType(type: PsiType, annotations: List<AnnotationItem> = emptyList()) { in <lambda>()
842 if (annotations.isNotEmpty()) { in <lambda>()
844 for (annotation in annotations) { in <lambda>()
861 handle(node.returnType, node.annotations) in <lambda>()
869 handle(type.type, psiAnnotations = type.annotations) in <lambda>()
877 handle(node.type, node.annotations) in <lambda>()
888 val annotations = mutableListOf<AnnotationItem>() in <lambda>() constant
890 annotations.add(UAnnotationItem.create(codebase, annotation)) in <lambda>()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/
DAnnotationsMerger.kt34 import com.android.tools.lint.annotations.Extractor.ANDROID_INT_DEF
35 import com.android.tools.lint.annotations.Extractor.ANDROID_NOTNULL
36 import com.android.tools.lint.annotations.Extractor.ANDROID_NULLABLE
37 import com.android.tools.lint.annotations.Extractor.ANDROID_STRING_DEF
38 import com.android.tools.lint.annotations.Extractor.ATTR_PURE
39 import com.android.tools.lint.annotations.Extractor.ATTR_VAL
40 import com.android.tools.lint.annotations.Extractor.IDEA_CONTRACT
41 import com.android.tools.lint.annotations.Extractor.IDEA_MAGIC
42 import com.android.tools.lint.annotations.Extractor.IDEA_NOTNULL
43 import com.android.tools.lint.annotations.Extractor.IDEA_NULLABLE
[all …]
DSdkFileWriter.kt78 val annotations = field.modifiers.annotations() in generate() constant
79 for (annotation in annotations) { in generate()
100 val annotations = clazz.modifiers.annotations() in generate() constant
101 if (!annotations.isEmpty()) { in generate()
102 for (annotation in annotations) { in generate()
DDocAnalyzer.kt107 val annotations = item.modifiers.annotations() in <lambda>() constant
108 if (annotations.isEmpty()) { in <lambda>()
112 for (annotation in annotations) { in <lambda>()
136 if (findThreadAnnotations(annotations).size > 1) { in <lambda>()
146 private fun findThreadAnnotations(annotations: List<AnnotationItem>): List<String> { in <lambda>()
148 for (annotation in annotations) { in <lambda>()
217 annotation.resolve()?.modifiers?.annotations()?.forEach { nested -> in <lambda>()
DNullnessMigration.kt115 return item.modifiers.annotations().firstOrNull { it.isNullnessAnnotation() } in findNullnessAnnotation()
119 return item.modifiers.annotations().any { it.isNullable() } in isNullable()
123 return item.modifiers.annotations().any { it.isNonNull() } in isNonNull()
/tools/metalava/src/test/java/com/android/tools/metalava/
DAnnotationsMergerTest.kt29 fun `Signature files contain annotations`() { in Signature files contain annotations()
77 fun `Merged class and method annotations with no arguments`() { in Merged class and method annotations with no arguments()
177 fun `Merge qualifier annotations from Java stub files`() { in Merge qualifier annotations from Java stub files()
214 fun `Merge type use qualifier annotations from Java stub files`() { in Merge type use qualifier annotations from Java stub files()
253 fun `Merge inclusion annotations from Java stub files`() { in Merge inclusion annotations from Java stub files()
312 fun `Merge inclusion annotations from Java stub files using --show-single-annotation`() { in Merge inclusion annotations from Java stub files using --show-single-annotation()
DApiFromTextTest.kt19 import org.intellij.lang.annotations.Language
199 fun `Type use annotations`() { in Type use annotations()
424 fun `Loading a signature file with annotations on classes, fields, methods and parameters`() { in Loading a signature file with annotations on classes, fields, methods and parameters()
446 fun `Enums and annotations`() { in Enums and annotations()
491 fun `Enums and annotations exported to compat`() { in Enums and annotations exported to compat()
606 fun `Signatures with many annotations`() { in Signatures with many annotations()
766 fun `Complicated annotations`() { in Complicated annotations()
DExtractAnnotationsTest.kt187 fun `Check including only class retention annotations other than typedefs`() { in Check including only class retention annotations other than typedefs()
265 fun `Extract permission annotations`() { in Extract permission annotations()
334 fun `Include merged annotations in exported source annotations`() { in Include merged annotations in exported source annotations()
388 fun `Only including class retention annotations in stubs`() { in Only including class retention annotations in stubs()
DNullnessMigrationTest.kt279 fun `Convert libcore nullness annotations to support`() { in Convert libcore nullness annotations to support()
330 fun `Check type use annotations`() { in Check type use annotations()
436 fun `Migrate nullness for type-use annotations`() { in Migrate nullness for type-use annotations()
506 fun `Do not migrate type-use annotations when not changed`() { in Do not migrate type-use annotations when not changed()
570 fun `Regression test for issue 111054266, type use annotations`() { in Regression test for issue 111054266, type use annotations()
DStubsTest.kt23 import org.intellij.lang.annotations.Language in <lambda>()
1864 fun `Rewrite libcore annotations`() { in <lambda>()
3308 fun `Test package-info annotations`() { in <lambda>()
3349 fun `Ensure we emit both deprecated javadoc and annotation with exclude-annotations`() { in <lambda>()
3387 fun `Ensure we emit runtime and deprecated annotations in stubs with exclude-annotations`() { in <lambda>()
3452 …n `Ensure we include class and runtime and not source annotations in stubs with include-annotation… in <lambda>()
DRewriteAnnotationsTest.kt33 fun `Test copying private annotations from one of the stubs`() { in Test copying private annotations from one of the stubs()
91 fun `Test rewriting the bytecode for one of the public annotations`() { in Test rewriting the bytecode for one of the public annotations()
123 fun `Test rewriting the bytecode for one of the public annotations in a jar file`() { in Test rewriting the bytecode for one of the public annotations in a jar file()
/tools/tradefederation/core/src/com/android/tradefed/result/
DTestDescription.java68 public TestDescription(String className, String testName, Annotation... annotations) { in TestDescription() argument
70 mAnnotations = annotations; in TestDescription()
80 public TestDescription(String className, String testName, Collection<Annotation> annotations) { in TestDescription() argument
81 this(className, testName, annotations.toArray(new Annotation[annotations.size()])); in TestDescription()
/tools/dexter/slicer/export/slicer/
Ddex_ir.h272 std::vector<Annotation*> annotations; member
278 std::vector<AnnotationSet*> annotations; member
285 AnnotationSet* annotations; member
292 AnnotationSet* annotations; member
299 AnnotationSetRefList* annotations; member
319 AnnotationsDirectory* annotations; member
377 std::vector<own<Annotation>> annotations; member
458 void Track(Annotation* p) { PushOwn(annotations, p); } in Track()
/tools/dexter/slicer/
Dwriter.cc433 for (const auto& ir_node : dex_ir_->annotations) { in CreateAnnItemSection()
653 const auto& annotations = ir_annotation_set->annotations; in WriteAnnotationSet() local
657 data.Push<dex::u4>(annotations.size()); in WriteAnnotationSet()
658 for (auto ir_annotation : annotations) { in WriteAnnotationSet()
669 const auto& annotations = ir_annotation_set_ref_list->annotations; in WriteAnnotationSetRefList() local
673 data.Push<dex::u4>(annotations.size()); in WriteAnnotationSetRefList()
674 for (auto ir_annotation_set : annotations) { in WriteAnnotationSetRefList()
682 if (ir_class->annotations == nullptr) { in WriteClassAnnotations()
686 auto ir_annotations = ir_class->annotations; in WriteClassAnnotations()
701 dex_item.annotations_off = FilePointer(irItem->annotations); in WriteClassAnnotations()
[all …]
Ddex_ir.cc271 for (const auto& irAnnotation : annotations) { in Normalize()
283 auto& annotations = irAnnotationSet->annotations; in Normalize() local
284 std::sort(annotations.begin(), annotations.end(), in Normalize()

123456789