Home
last modified time | relevance | path

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

1234567891011

/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiTypePrinter.kt89 annotations: Array<PsiAnnotation>, in <lambda>()
93 val nullable = getNullable(annotations, elementAnnotations) in <lambda>()
157 val annotations = type.annotations in <lambda>() constant
158 if (annotations.isEmpty() && suffix == null) return "?" in <lambda>()
161 appendAnnotations(sb, annotations, elementAnnotations) in <lambda>()
186 val annotations = type.annotations in <lambda>() constant
187 if (annotations.isNotEmpty()) { in <lambda>()
188 appendAnnotations(sb, annotations, null) in <lambda>()
211 val annotations = type.annotations in <lambda>() constant
213 if (annotations.isNotEmpty()) { in <lambda>()
[all …]
DPsiModifierItem.kt49 annotations: MutableList<AnnotationItem>? = null
50 ) : DefaultModifierList(codebase, flags, annotations), ModifierList, MutableModifierList {
176 val psiAnnotations = modifierList.annotations in create()
180 val annotations: MutableList<AnnotationItem> = in create() constant
198 PsiModifierItem(codebase, flags, annotations) in create()
212 val psiAnnotations = modifierList.annotations in create()
214 val annotations: MutableList<AnnotationItem> = in create() constant
216 PsiModifierItem(codebase, flags, annotations) in create()
223 val annotations: MutableList<AnnotationItem> = uAnnotations in create() constant
244 val psiAnnotations = modifierList.annotations in create()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DApiFile.java25 import com.google.common.annotations.VisibleForTesting;
29 import org.jetbrains.annotations.Nullable;
189 List<String> annotations = getAnnotations(tokenizer, token); in parsePackage() local
191 if (annotations != null) { in parsePackage()
192 modifiers.addAnnotations(annotations); in parsePackage()
248 List<String> annotations = getAnnotations(tokenizer, token); in parseClass() local
251 TextModifiers modifiers = parseModifiers(api, tokenizer, token, annotations); in parseClass()
295 rawName, annotations); in parseClass()
365 …>> processKotlinTypeSuffix(TextCodebase api, String type, List<String> annotations) throws ApiPars… in processKotlinTypeSuffix() argument
374 annotations = mergeAnnotations(annotations, ANDROIDX_NULLABLE); in processKotlinTypeSuffix()
[all …]
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/
DFORMAT.md17 format adds new information, such as annotations, parameter names and default
21 3. This is format v2, but with 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).
44 signature files, the SDK stub files, external annotations etc.
82 * Ability to merge in data (annotations etc) from external sources, such as
83 IntelliJ external annotations data as well as signature files containing
84 annotations. This isn't just merged at export time, it's merged at codebase
93 instead of "abstract class extends java.lang.Enum", annotations as
100 * Add support for writing (and reading) annotations into the signature
[all …]
DAndroid.bp46 name: "stub-annotations",
49 "stub-annotations/src/main/java/**/*.java",
51 // Allow core_current to use stub-annotations.
63 name: "private-stub-annotations",
69 "stub-annotations/src/main/java/**/*.java",
71 cmd: "($(location metalava) --no-banner --copy-annotations tools/metalava/stub-annotations " +
72 …"$(genDir)/private-stub-annotations) && ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)…
74 "private-stub-annotations.srcjar",
79 name: "private-stub-annotations-jar",
82 ":private-stub-annotations",
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DModifierList.kt32 fun annotations(): List<AnnotationItem> in <lambda>() method
86 return annotations().any { it.isNonNull() || it.isNullable() } in <lambda>()
91 return annotations().any { it.isNullable() } in <lambda>()
102 return annotations().any { in <lambda>()
116 return annotations().any { in <lambda>()
129 return annotations().any { in <lambda>()
145 return annotations().any { annotation -> in <lambda>()
165 return annotations().any { annotation -> in <lambda>()
178 return annotations().firstOrNull { in <lambda>()
510 var annotations = list.annotations() in <lambda>() variable
[all …]
DDefaultModifierList.kt24 protected open 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()
219 if (annotations == null) { in addAnnotation()
220 annotations = mutableListOf() in addAnnotation()
222 annotations?.add(annotation) in addAnnotation()
226 annotations?.remove(annotation) in removeAnnotation()
230 annotations?.clear() in clearAnnotations()
DAnnotationItem.kt24 import com.android.tools.lint.annotations.Extractor.ANDROID_INT_DEF in <lambda>()
25 import com.android.tools.lint.annotations.Extractor.ANDROID_LONG_DEF in <lambda>()
26 import com.android.tools.lint.annotations.Extractor.ANDROID_STRING_DEF in <lambda>()
139 …return codebase.findClass(className)?.modifiers?.annotations()?.firstOrNull { it.isTypeDefAnnotati… in findTypedefAnnotation()
518 if (cls.modifiers.annotations().any { it.isTypeDefAnnotation() }) { in nullableAnnotationName()
613 resolved.annotations.any { in getImplicitNullness()
622 resolved.annotations.any { in getImplicitNullness()
/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()
99 val annotations = clazz.modifiers.annotations() in generate() constant
100 if (annotations.isNotEmpty()) { in generate()
101 for (annotation in annotations) { in generate()
DDocAnalyzer.kt111 val annotations = item.modifiers.annotations() in <lambda>() constant
112 if (annotations.isEmpty()) { in <lambda>()
116 for (annotation in annotations) { in <lambda>()
140 if (findThreadAnnotations(annotations).size > 1) { in <lambda>()
150 private fun findThreadAnnotations(annotations: List<AnnotationItem>): List<String> { in <lambda>()
152 for (annotation in annotations) { in <lambda>()
222 annotation.resolve()?.modifiers?.annotations()?.forEach { nested -> 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/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>()
821 fun handleType(type: PsiType, annotations: List<AnnotationItem> = emptyList()) { in <lambda>()
845 if (annotations.isNotEmpty()) { in <lambda>()
847 for (annotation in annotations) { in <lambda>()
872 handle(type.type, psiAnnotations = type.annotations) in <lambda>()
891 val annotations = mutableListOf<AnnotationItem>() in <lambda>() constant
893 annotations.add(UAnnotationItem.create(codebase, annotation)) in <lambda>()
896 annotations.add(PsiAnnotationItem.create(codebase, annotation)) in <lambda>()
899 handleType(type, annotations) in <lambda>()
/tools/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsTest.kt42 import org.intellij.lang.annotations.Language in <lambda>()
1847 fun `Rewrite unknown nullability annotations as sdk stubs`() { in <lambda>()
1880 fun `Rewrite unknown nullability annotations as doc stubs`() { in <lambda>()
1914 fun `Rewrite libcore annotations`() { in <lambda>()
1958 fun `Pass through libcore annotations`() { in <lambda>()
1999 fun `Pass through multiple annotations`() { in <lambda>()
3409 fun `Test package-info annotations`() { in <lambda>()
3450 fun `Ensure we emit both deprecated javadoc and annotation with exclude-annotations`() { in <lambda>()
3488 fun `Ensure we emit runtime and deprecated annotations in stubs with exclude-annotations`() { in <lambda>()
3553 …n `Ensure we include class and runtime and not source annotations in stubs with include-annotation… in <lambda>()
/tools/dexter/slicer/
Dwriter.cc440 for (const auto& ir_node : dex_ir_->annotations) { in CreateAnnItemSection()
660 const auto& annotations = ir_annotation_set->annotations; in WriteAnnotationSet() local
664 data.Push<dex::u4>(annotations.size()); in WriteAnnotationSet()
665 for (auto ir_annotation : annotations) { in WriteAnnotationSet()
676 const auto& annotations = ir_annotation_set_ref_list->annotations; in WriteAnnotationSetRefList() local
680 data.Push<dex::u4>(annotations.size()); in WriteAnnotationSetRefList()
681 for (auto ir_annotation_set : annotations) { in WriteAnnotationSetRefList()
689 if (ir_class->annotations == nullptr) { in WriteClassAnnotations()
693 auto ir_annotations = ir_class->annotations; in WriteClassAnnotations()
708 dex_item.annotations_off = FilePointer(irItem->annotations); in WriteClassAnnotations()
[all …]
Dreader.cc274 ir_class->annotations = ExtractAnnotations(dex_class_def.annotations_off); in ParseClass()
344 ir_annotation_set->annotations.push_back(ir_annotation); in ExtractAnnotationSet()
361 ir_annotation_set_ref_list->annotations.push_back(ir_annotation_set); in ExtractAnnotationSetRefList()
374 ir_field_annotation->annotations = in ParseFieldAnnotation()
376 SLICER_CHECK(ir_field_annotation->annotations != nullptr); in ParseFieldAnnotation()
389 ir_method_annotation->annotations = in ParseMethodAnnotation()
391 SLICER_CHECK(ir_method_annotation->annotations != nullptr); in ParseMethodAnnotation()
404 ir_param_annotation->annotations = in ParseParamAnnotation()
406 SLICER_CHECK(ir_param_annotation->annotations != nullptr); in ParseParamAnnotation()
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()
/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()
219 …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()
291 fun `Merge type use qualifier annotations from Java stub files`() { in Merge type use qualifier annotations from Java stub files()
330 …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()
378 fun `Merge inclusion annotations from Java stub files`() { in Merge inclusion annotations from Java stub files()
437 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
220 fun `Type use annotations`() { in Type use annotations()
445 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()
467 fun `Enums and annotations`() { in Enums and annotations()
512 fun `Enums and annotations exported to compat`() { in Enums and annotations exported to compat()
627 fun `Signatures with many annotations`() { in Signatures with many annotations()
787 fun `Complicated annotations`() { in Complicated annotations()
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()
638 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()
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()
/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/tradefederation/core/test_result_interfaces/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()

1234567891011