Home
last modified time | relevance | path

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

12345

/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.kt51 annotations: MutableList<AnnotationItem>? = null in <lambda>()
52 ) : DefaultModifierList(codebase, flags, annotations), ModifierList, MutableModifierList { in <lambda>()
184 val psiAnnotations = modifierList.annotations in <lambda>()
188 val annotations: MutableList<AnnotationItem> = in <lambda>() constant
206 PsiModifierItem(codebase, flags, annotations) in <lambda>()
220 val psiAnnotations = modifierList.annotations in <lambda>()
222 val annotations: MutableList<AnnotationItem> = in <lambda>() constant
224 PsiModifierItem(codebase, flags, annotations) in <lambda>()
231 val annotations: MutableList<AnnotationItem> = uAnnotations in <lambda>() constant
252 val psiAnnotations = modifierList.annotations in <lambda>()
[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/src/main/java/com/android/tools/metalava/model/
DModifierList.kt32 fun annotations(): List<AnnotationItem> in <lambda>() method
87 return annotations().any { it.isNonNull() || it.isNullable() } in <lambda>()
92 return annotations().any { it.isNullable() } in <lambda>()
103 return annotations().any { in <lambda>()
117 return annotations().any { in <lambda>()
130 return annotations().any { in <lambda>()
132 } && !annotations().any { in <lambda>()
148 return annotations().any { annotation -> in <lambda>()
168 return annotations().any { annotation -> in <lambda>()
181 return annotations().firstOrNull { in <lambda>()
[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()
227 if (annotations == null) { in addAnnotation()
228 annotations = mutableListOf() in addAnnotation()
230 annotations?.add(annotation) in addAnnotation()
234 annotations?.remove(annotation) in removeAnnotation()
238 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()
535 if (cls.modifiers.annotations().any { it.isTypeDefAnnotation() }) { in nullableAnnotationName()
630 resolved.annotations.any { in getImplicitNullness()
639 resolved.annotations.any { in getImplicitNullness()
/tools/metalava/
DAndroid.bp50 name: "stub-annotations",
53 "stub-annotations/src/main/java/**/*.java",
55 // Allow core_current to use stub-annotations.
67 name: "private-stub-annotations",
73 "stub-annotations/src/main/java/**/*.java",
75 cmd: "($(location metalava) --no-banner --copy-annotations tools/metalava/stub-annotations " +
76 …"$(genDir)/private-stub-annotations) && ($(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)…
78 "private-stub-annotations.srcjar",
83 name: "private-stub-annotations-jar",
86 ":private-stub-annotations",
[all …]
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 …]
/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/
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()
182 fun `Merge qualifier annotations from Java stub files`() { in Merge qualifier annotations from Java stub files()
224 …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()
300 fun `Merge type use qualifier annotations from Java stub files`() { in Merge type use qualifier annotations from Java stub files()
339 …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()
387 fun `Merge inclusion annotations from Java stub files`() { in Merge inclusion annotations from Java stub files()
446 fun `Merge inclusion annotations from Java stub files using --show-single-annotation`() { in Merge inclusion annotations from Java stub files using --show-single-annotation()
490 fun `Merge inclusion annotations on api in java namespace`() { in Merge inclusion annotations on api in java namespace()
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.kt285 fun `Convert libcore nullness annotations to support`() { in Convert libcore nullness annotations to support()
336 fun `Check type use annotations`() { in Check type use annotations()
442 fun `Migrate nullness for type-use annotations`() { in Migrate nullness for type-use annotations()
516 fun `Do not migrate type-use annotations when not changed`() { in Do not migrate type-use annotations when not changed()
584 fun `Regression test for issue 111054266, type use annotations`() { in Regression test for issue 111054266, type use annotations()
656 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/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/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.kt109 val annotations = item.modifiers.annotations() in <lambda>() constant
110 if (annotations.isEmpty()) { in <lambda>()
114 for (annotation in annotations) { in <lambda>()
138 if (findThreadAnnotations(annotations).size > 1) { in <lambda>()
148 private fun findThreadAnnotations(annotations: List<AnnotationItem>): List<String> { in <lambda>()
150 for (annotation in annotations) { in <lambda>()
222 annotation.resolve()?.modifiers?.annotations()?.forEach { nested -> in <lambda>()
/tools/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsTest.kt44 import org.intellij.lang.annotations.Language in <lambda>()
1860 fun `Rewrite unknown nullability annotations as sdk stubs`() { in <lambda>()
1894 fun `Rewrite unknown nullability annotations as doc stubs`() { in <lambda>()
1929 fun `Rewrite libcore annotations`() { in <lambda>()
1977 fun `Pass through libcore annotations`() { in <lambda>()
2021 fun `Pass through multiple annotations`() { in <lambda>()
3491 fun `Test package-info annotations`() { in <lambda>()
3536 fun `Ensure we emit both deprecated javadoc and annotation with exclude-all-annotations`() { in <lambda>()
3576 fun `Ensure we emit runtime and deprecated annotations in stubs with exclude-annotations`() { in <lambda>()
3643 …n `Ensure we include class and runtime and not source annotations in stubs with include-annotation… in <lambda>()
/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.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 …]
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()
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()
/tools/metalava/src/main/java/com/android/tools/metalava/stub/
DStubWriter.kt118 val annotations = pkg.modifiers.annotations() in <lambda>() constant
119 if (annotations.isNotEmpty() && generateAnnotations || !pkg.documentation.isBlank()) { in <lambda>()
131 if (annotations.isNotEmpty()) { in <lambda>()

12345