Home
last modified time | relevance | path

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

12345678910>>...15

/tools/metalava/metalava-model-text/src/main/java/com/android/tools/metalava/model/text/
DTextTypeParser.kt96 annotations: List<AnnotationItem> = emptyList(), in <lambda>()
108 return if (annotations.isEmpty()) { in <lambda>()
119 parseType(type, typeParameterScope, annotations, forceClassToBeNonNull) in <lambda>()
127 annotations: List<AnnotationItem>, in <lambda>()
132 val allAnnotations = annotations + annotationsFromString in <lambda>()
175 annotations: List<AnnotationItem>, in <lambda>()
194 return DefaultPrimitiveTypeItem(modifiers(annotations, TypeNullability.NONNULL), kind) in <lambda>()
271 allAnnotations.zip(allNullability.reversed()).map { (annotations, nullability) -> in <lambda>() method
272 modifiers(annotations, nullability) in <lambda>()
298 annotations: List<AnnotationItem>, in <lambda>()
[all …]
DApiFile.kt407 val annotations = getAnnotations(tokenizer, token) in parsePackage() constant
408 val modifiers = createModifiers(DefaultModifierList.PUBLIC, annotations) in parsePackage()
459 val annotations = getAnnotations(tokenizer, token) in parseClass() constant
461 val modifiers = parseModifiers(tokenizer, token, annotations) in parseClass()
653 val newClassAnnotations = newClassCharacteristics.modifiers.annotations().toSet() in tryMergingIntoExistingClass()
654 val existingClassAnnotations = existingCharacteristics.modifiers.annotations().toSet() in tryMergingIntoExistingClass()
933 val annotations: MutableList<AnnotationItem> = mutableListOf() in getAnnotations() constant
938 annotations.add(DefaultAnnotationItem.create(codebase, annotationSource)) in getAnnotations()
940 return annotations in getAnnotations()
953 val annotations = getAnnotations(tokenizer, token) in parseConstructor() constant
[all …]
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/typeitem/
DCommonTypeStringTest.kt112 val annotations: Boolean = false, in <lambda>() constant in com.android.tools.metalava.model.testsuite.typeitem.CommonTypeStringTest.TypeStringConfiguration
168 annotations = parameters.typeStringConfiguration.annotations, in <lambda>()
280 configuration = TypeStringConfiguration(annotations = true), in <lambda>()
292 annotations = true, in <lambda>()
314 configuration = TypeStringConfiguration(annotations = true), in <lambda>()
327 annotations = true, in <lambda>()
386 configuration = TypeStringConfiguration(annotations = true), in <lambda>()
399 annotations = true, in <lambda>()
421 configuration = TypeStringConfiguration(annotations = true), in <lambda>()
434 annotations = true, in <lambda>()
[all …]
DCommonTypeModifiersTest.kt117 fun `Test type-use annotations with multiple allowed targets`() { in <lambda>()
191 fun `Test kotlin type-use annotations with multiple allowed targets on non-type target`() { in <lambda>()
233 fun `Test filtering of annotations based on target usages`() { in <lambda>()
272 fun `Test annotations on qualified class type`() { in <lambda>()
306 fun `Test annotations on class type parameters`() { in <lambda>()
351 fun `Test annotations on array type and component type`() { in <lambda>()
425 fun `Test annotations on multidimensional array`() { in <lambda>()
476 fun `Test annotations on multidimensional vararg array`() { in <lambda>()
525 fun `Test inner parameterized types with annotations`() { in <lambda>()
617 val annotations = bar.modifiers.annotations() in <lambda>() constant
[all …]
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/annotationitem/
DCommonAnnotationItemTest.kt77 val anno = testClass.modifiers.annotations().single() in annotation with annotation values()
136 val anno = testClass.modifiers.annotations().single() in annotation with boolean values()
186 val anno = testClass.modifiers.annotations().single() in annotation with char values()
236 val anno = testClass.modifiers.annotations().single() in annotation with class values()
347 val anno = testClass.modifiers.annotations().single() in annotation with number values()
417 val anno = testClass.modifiers.annotations().single() in annotation with string values()
459 val anno = testClass.modifiers.annotations().single() in annotation array values with single element()
500 val anno = testClass.modifiers.annotations().single() in annotation array values with single array element()
559 val anno = testClass.modifiers.annotations().single() in annotation with enum values()
607 val anno = testClass.modifiers.annotations().single() in annotation with constant literal values()
[all …]
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/
DDefaultModifierList.kt22 private var annotations: MutableList<AnnotationItem>? = null variable in com.android.tools.metalava.model.DefaultModifierList
40 override fun annotations(): List<AnnotationItem> { in annotations() method
41 return annotations ?: emptyList() in annotations()
259 if (annotations == null) { in addAnnotation()
260 annotations = mutableListOf() in addAnnotation()
262 annotations?.add(annotation) in addAnnotation()
266 annotations?.remove(annotation) in removeAnnotation()
270 annotations?.removeAll(predicate) in removeAnnotations()
274 annotations?.clear() in clearAnnotations()
290 val annotations = this.annotations in duplicate() constant
[all …]
DTypeItem.kt81 annotations: Boolean = false, in <lambda>()
377 annotations: Boolean, in toString()
383 TypeStringConfiguration(annotations, kotlinStyleNulls, filter, spaceBetweenParameters) in toString()
432 val annotations: Boolean = false, in hashCode() constant in com.android.tools.metalava.model.DefaultTypeItem.Companion.TypeStringConfiguration
438 !annotations && !kotlinStyleNulls && filter == null && !spaceBetweenParameters in hashCode()
447 if (configuration.annotations) { in hashCode()
457 if (configuration.annotations) { in hashCode()
499 if (configuration.annotations) { in hashCode()
504 if (configuration.annotations) { in hashCode()
531 if (configuration.annotations) { in hashCode()
[all …]
DModifierListWriter.kt276 var annotations = list.annotations() in <lambda>() variable
279 if (annotations.size > 1) { in <lambda>()
280 annotations = annotations.sortedBy { it.qualifiedName } in <lambda>()
283 if (annotations.isNotEmpty()) { in <lambda>()
287 for (annotation in annotations) { in <lambda>()
/tools/metalava/
DAndroid.bp38 name: "stub-annotations",
41 "stub-annotations/src/main/java/**/*.java",
43 // Allow core_current to use stub-annotations.
55 name: "private-stub-annotations",
61 "stub-annotations/src/main/java/**/*.java",
63 cmd: "($(location metalava) make-annotations-package-private " +
64 "tools/metalava/stub-annotations/src/main/java $(genDir)/private-stub-annotations) " +
67 "private-stub-annotations.srcjar",
72 name: "private-stub-annotations-jar",
75 ":private-stub-annotations",
[all …]
DUSAGE.md22 - Rewriting of nullness annotations to @RecentlyNull/NonNull (`--migrate-nullness`,
23 `--force-convert-to-warning-nullability-annotations`) for SDK
27 …lude, exclude, rewrite, passthrough in stubs (`--include-annotations`, `--exclude-all-annotations`,
29 - Annotation extraction (`--extract-annotations`, `--copy-annotations`) for generating the SDK
DFORMAT.md21 format adds new information, such as annotations, parameter names and default
25 3. This is format v2, but with all nullness annotations replaced by a
28 in format v2, but it was deferred since type-use annotations introduces
38 developers), we'd like to have nullness annotations (as well as some other
39 annotations) be a formal part of the SDK.
41 That means the annotations should be part of the signature files too -- such
75 The new signature format now includes annotations; not all annotations (such as
77 annotations, etc.
90 (Notice how the annotations are not using fully qualified name; that's discussed
93 The annotations to be included are annotations for annotation types that are not
[all …]
/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/metalava-model/src/main/java/com/android/tools/metalava/model/type/
DDefaultTypeModifiers.kt26 private val annotations: MutableList<AnnotationItem>, in <lambda>() constant in com.android.tools.metalava.model.type.DefaultTypeModifiers
39 override fun annotations(): List<AnnotationItem> = annotations in <lambda>() method in com.android.tools.metalava.model.type.DefaultTypeModifiers
43 annotations.add(annotation) in <lambda>()
48 annotations.remove(annotation) in <lambda>()
62 DefaultTypeModifiers(annotations.toMutableList(), withNullability ?: nullability) in <lambda>()
76 annotations: List<AnnotationItem>, in <lambda>()
84 ?: annotations in <lambda>()
88 return DefaultTypeModifiers(annotations.toMutableList(), nullability, immutableReason) in <lambda>()
/tools/metalava/metalava/src/test/java/com/android/tools/metalava/
DAnnotationsMergerTest.kt33 fun `Signature files contain annotations`() { in Signature files contain annotations()
83 fun `Merged class and method annotations with no arguments`() { in Merged class and method annotations with no arguments()
192 fun `Merge qualifier annotations from Java stub files`() { in Merge qualifier annotations from Java stub files()
245 …fun `Merge qualifier annotations from Java stub files onto stubs that are not in the API signature… in Merge qualifier annotations from Java stub files onto stubs that are not in the API signature file()
321 fun `Merge type use qualifier annotations from Java stub files`() { in Merge type use qualifier annotations from Java stub files()
361 …fun `Merge qualifier annotations from Java stub files making sure they apply to public members of … in Merge qualifier annotations from Java stub files making sure they apply to public members of hidden superclasses()
410 fun `Merge inclusion annotations from Java stub files`() { in Merge inclusion annotations from Java stub files()
481 fun `Merge inclusion annotations from multiple Java stub files`() { in Merge inclusion annotations from multiple Java stub files()
559 fun `Merge @FlaggedApi inclusion annotations from Java stub files`() { in Merge @FlaggedApi inclusion annotations from Java stub files()
617 fun `Merge inclusion annotations from Java stub files using --show-single-annotation`() { in Merge inclusion annotations from Java stub files using --show-single-annotation()
[all …]
DExtractAnnotationsTest.kt202 fun `Check including only class retention annotations other than typedefs`() { in Check including only class retention annotations other than typedefs()
284 fun `Extract permission annotations`() { in Extract permission annotations()
357 fun `Include merged annotations in exported source annotations`() { in Include merged annotations in exported source annotations()
424 fun `Only including class retention annotations in stubs`() { in Only including class retention annotations in stubs()
738 fun `Test annotations on inherited methods`() { in Test annotations on inherited methods()
799 fun `Test generating annotations zip from signature file`() { in Test generating annotations zip from signature file()
DNullnessMigrationTest.kt301 fun `Convert libcore nullness annotations to support`() { in Convert libcore nullness annotations to support()
353 fun `Check type use annotations`() { in Check type use annotations()
462 fun `Migrate nullness for type-use annotations`() { in Migrate nullness for type-use annotations()
537 fun `Do not migrate type-use annotations when not changed`() { in Do not migrate type-use annotations when not changed()
606 fun `Regression test for issue 111054266, type use annotations`() { in Regression test for issue 111054266, type use annotations()
680 fun `Merge nullness annotations in stubs that are not in the API signature file`() { in Merge nullness annotations in stubs that are not in the API signature file()
/tools/metalava/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsAnnotationTest.kt147 fun `Rewrite unknown nullability annotations as sdk stubs`() { in Rewrite unknown nullability annotations as sdk stubs()
185 fun `Rewrite unknown nullability annotations as doc stubs`() { in Rewrite unknown nullability annotations as doc stubs()
224 fun `Rewrite libcore annotations`() { in Rewrite libcore annotations()
275 fun `Pass through libcore annotations`() { in Pass through libcore annotations()
321 fun `Pass through multiple annotations`() { in Pass through multiple annotations()
590 fun `Ensure we emit both deprecated javadoc and annotation with exclude-all-annotations`() { in Ensure we emit both deprecated javadoc and annotation with exclude-all-annotations()
631 fun `Ensure we emit runtime and deprecated annotations in stubs with exclude-annotations`() { in Ensure we emit runtime and deprecated annotations in stubs with exclude-annotations()
700 …n `Ensure we include class and runtime and not source annotations in stubs with include-annotation… in Ensure we include class and runtime and not source annotations in stubs with include-annotations()
/tools/metalava/metalava-model-psi/src/test/java/com/android/tools/metalava/model/psi/
DPsiPropertyItemTest.kt260 withFieldBackingField.modifiers.annotations().exceptNullness() in annotation on properties()
268 val annotations = propertyItem.modifiers.annotations().exceptNullness() in annotation on properties() constant
269 assertEquals(1, annotations.size) in annotation on properties()
270 assertEquals(expectedAnnotationName, annotations.single().qualifiedName) in annotation on properties()
286 val annotations = propertyItem.modifiers.annotations().exceptNullness() in annotation on properties() constant
287 assertEquals(expectedAnnotationCounts, annotations.size) in annotation on properties()
288 annotations.forEach { assertEquals(expectedAnnotationName, it.qualifiedName) } in annotation on properties()
/tools/metalava/metalava-model-turbine/src/main/java/com/android/tools/metalava/model/turbine/
DTurbineModifierItem.kt41 annotations: List<AnnotationItem>?, in create()
47 DefaultModifierList(codebase, annotations = annotations?.toMutableList()) in create()
50 DefaultModifierList(codebase, computeFlag(flag), annotations?.toMutableList()) in create()
53 modifierItem.setDeprecated(isDeprecated(annotations) || isDeprecatedViaDoc) in create()
113 private fun isDeprecated(annotations: List<AnnotationItem>?): Boolean { in isDeprecated()
114 return annotations?.any { it.qualifiedName == "java.lang.Deprecated" } ?: false in isDeprecated()
DTurbineCodebaseInitialiser.kt309 val annotations = createAnnotations(cls.annotations()) in <lambda>() constant
315 annotations, in <lambda>()
410 internal fun createAnnotations(annotations: List<AnnoInfo>): List<AnnotationItem> { in <lambda>()
411 return annotations.map { createAnnotation(it) } in <lambda>()
595 TurbineModifierItem.create(codebase, 0, createAnnotations(param.annotations()), false) in <lambda>()
632 val annotations = createAnnotations(field.annotations()) in <lambda>() constant
639 annotations, in <lambda>()
647 itemAnnotations = annotations, in <lambda>()
683 val annotations = createAnnotations(method.annotations()) in <lambda>() constant
689 annotations, in <lambda>()
[all …]
/tools/metalava/metalava/src/main/java/com/android/tools/metalava/
DAnnotationsMerger.kt31 import com.android.tools.lint.annotations.Extractor.ANDROID_INT_DEF in <lambda>()
32 import com.android.tools.lint.annotations.Extractor.ANDROID_NOTNULL in <lambda>()
33 import com.android.tools.lint.annotations.Extractor.ANDROID_NULLABLE in <lambda>()
34 import com.android.tools.lint.annotations.Extractor.ANDROID_STRING_DEF in <lambda>()
35 import com.android.tools.lint.annotations.Extractor.ATTR_PURE in <lambda>()
36 import com.android.tools.lint.annotations.Extractor.ATTR_VAL in <lambda>()
37 import com.android.tools.lint.annotations.Extractor.IDEA_CONTRACT in <lambda>()
38 import com.android.tools.lint.annotations.Extractor.IDEA_MAGIC in <lambda>()
39 import com.android.tools.lint.annotations.Extractor.IDEA_NOTNULL in <lambda>()
40 import com.android.tools.lint.annotations.Extractor.IDEA_NULLABLE in <lambda>()
[all …]
DSdkFileWriter.kt77 val annotations = field.modifiers.annotations() in generate() constant
78 for (annotation in annotations) { in generate()
101 val annotations = clazz.modifiers.annotations() in generate() constant
102 if (annotations.isNotEmpty()) { in generate()
103 for (annotation in annotations) { in generate()
/tools/metalava/metalava-model-text/src/test/java/com/android/tools/metalava/model/text/
DTextTypeParserTest.kt56 fun `Test type parameter strings with annotations`() { in Test type parameter strings with annotations()
135 val (type, annotations) = annotationFunction(original) in testAnnotations() constant
139 assertThat(annotations).isEqualTo(expectedAnnotationItems) in testAnnotations()
143 fun `Test trimming annotations from the front of a type`() { in Test trimming annotations from the front of a type()
207 fun `Test trimming annotations from the end of a type`() { in Test trimming annotations from the end of a type()
282 val (className, params, annotations) = typeParser.splitClassType(original) in testClassAnnotations() constant
287 assertThat(annotations).isEqualTo(expectedAnnotationItems) in testClassAnnotations()
291 fun `Test trimming annotations from a class type`() { in Test trimming annotations from a class type()
409 fun `Test parsing of array types with annotations`() { in Test parsing of array types with annotations()
462 fun `Test parsing of class types with annotations`() { in Test parsing of class types with annotations()
/tools/metalava/metalava-model-psi/src/main/java/com/android/tools/metalava/model/psi/
DPsiModifierItem.kt68 import org.jetbrains.annotations.NotNull in <lambda>()
69 import org.jetbrains.annotations.Nullable in <lambda>()
357 ?.annotations in <lambda>()
418 val psiAnnotations = element.annotations in <lambda>()
422 val annotations: MutableList<AnnotationItem> = in <lambda>() constant
449 DefaultModifierList(codebase, flags, annotations) in <lambda>()
461 modifierList.annotations.takeIf { it.isNotEmpty() } in <lambda>()
462 ?: (annotated.javaPsi as? PsiModifierListOwner)?.annotations in <lambda>()
469 val annotations: MutableList<AnnotationItem> = in <lambda>() constant
471 DefaultModifierList(codebase, flags, annotations) in <lambda>()
[all …]
/tools/metalava/metalava/src/test/resources/
Dsource-model-provider-baseline.txt5 Merge @FlaggedApi inclusion annotations from Java stub files[turbine]
6 Merge Contract and Language annotations from XML files[turbine]
7 Merge Contract and Language annotations from signature files[turbine]
8 Merge type use qualifier annotations from Java stub files[turbine]
9 Signature files contain annotations[turbine]
29 Type-use annotations can be included in signature files[turbine]
41 Extract permission annotations[turbine]
42 Include merged annotations in exported source annotations[turbine]
44 Only including class retention annotations in stubs[turbine]
45 Test annotations on inherited methods[turbine]
[all …]

12345678910>>...15