Home
last modified time | relevance | path

Searched refs:modifiers (Results 1 – 25 of 61) sorted by relevance

123

/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DApiFile.java190 TextModifiers modifiers = new TextModifiers(api, DefaultModifierList.PUBLIC, null); in parsePackage() local
192 modifiers.addAnnotations(annotations); in parsePackage()
210 pkg = new TextPackageItem(api, name, modifiers, tokenizer.pos()); in parsePackage()
217 name, pkg.getModifiers(), modifiers), tokenizer); in parsePackage()
251 TextModifiers modifiers = parseModifiers(api, tokenizer, token, annotations); in parseClass() local
258 modifiers.setAbstract(true); in parseClass()
262 modifiers.setAbstract(true); in parseClass()
267 modifiers.setFinal(true); in parseClass()
268 modifiers.setStatic(true); in parseClass()
293 cl = new TextClassItem(api, tokenizer.pos(), modifiers, isInterface, isEnum, isAnnotation, in parseClass()
[all …]
DTextMethodItem.kt34 modifiers: TextModifiers,
39 modifiers = modifiers
43 modifiers.setOwner(this)
138 modifiers.duplicate(), returnType, position in duplicate()
DTextClassItem.kt37 modifiers: TextModifiers,
48 modifiers = modifiers
53 modifiers.setOwner(this)
277 modifiers = TextModifiers(codebase, DefaultModifierList.PUBLIC) in createClassStub()
/tools/metalava/src/main/java/com/android/tools/metalava/
DJDiffXmlWriter.kt104 val modifiers = cls.modifiers in <lambda>() constant
106 writer.print(modifiers.isAbstract()) in <lambda>()
108 writer.print(modifiers.isStatic()) in <lambda>()
110 writer.print(modifiers.isFinal()) in <lambda>()
114 writer.print(modifiers.getVisibilityModifiers()) in <lambda>()
169 val modifiers = constructor.modifiers in <lambda>() constant
175 writer.print(modifiers.isStatic()) in <lambda>()
177 writer.print(modifiers.isFinal()) in <lambda>()
181 writer.print(modifiers.getVisibilityModifiers()) in <lambda>()
197 val modifiers = field.modifiers in <lambda>() constant
[all …]
DApiLint.kt346 val modifiers = field.modifiers in <lambda>() constant
347 if (modifiers.isStatic() && modifiers.isFinal()) { in <lambda>()
596 if (method.isConstructor() || method.modifiers.isStatic() || method.modifiers.isFinal()) { in <lambda>()
603 cls.modifiers.isFinal() -> return in <lambda>()
839 !method.modifiers.isStatic() in <lambda>()
844 !method.modifiers.isStatic() in <lambda>()
896 if (!cls.modifiers.isFinal()) { in <lambda>()
928 val modifiers = member.modifiers in <lambda>() constant
929 if (modifiers.isProtected()) { in <lambda>()
988 val modifiers = field.modifiers in <lambda>() constant
[all …]
DApiAnalyzer.kt357 if (!method.modifiers.isAbstract() || !method.modifiers.isPublicOrProtected()) { in <lambda>()
391 if (method.modifiers.isAbstract() || !method.modifiers.isPublic()) { in <lambda>()
417 val modifiers = method.modifiers in <lambda>() constant
418 if (!modifiers.isPrivate() && !modifiers.isAbstract()) { in <lambda>()
548 pkg.modifiers.hasShowAnnotation() -> pkg.hidden = false in <lambda>()
549 pkg.modifiers.hasHideAnnotations() -> pkg.hidden = true in <lambda>()
564 if (cls.modifiers.hasShowAnnotation()) { in <lambda>()
572 } else if (cls.modifiers.hasHideAnnotations()) { in <lambda>()
577 …} else if (containingClass.originallyHidden && containingClass.modifiers.hasShowSingleAnnotation()… in <lambda>()
600 if (containingPackage.removed && !cls.modifiers.hasShowAnnotation()) { in <lambda>()
[all …]
DKotlinInteropChecks.kt101 val annotation = method.modifiers.findAnnotation("kotlin.jvm.Throws") in <lambda>()
129 val modifiers = field.modifiers in <lambda>() constant
130 if (modifiers.isPublic() && modifiers.isFinal()) { in <lambda>()
141 if (!modifiers.isConst()) { in <lambda>()
142 if (modifiers.findAnnotation("kotlin.jvm.JvmField") == null) { in <lambda>()
147 } else if (modifiers.findAnnotation("kotlin.jvm.JvmStatic") != null) { in <lambda>()
211 …ontainingClass().simpleName() == "Companion" && method.isKotlin() && method.modifiers.isPublic()) { in <lambda>()
247 } else if (method.modifiers.findAnnotation("kotlin.jvm.JvmStatic") == null) { in <lambda>()
292 if (haveDefault && method.modifiers.findAnnotation("kotlin.jvm.JvmOverloads") == null && in <lambda>()
294 !method.isExtensionMethod() && !method.modifiers.isInline() in <lambda>()
[all …]
DCompatibilityCheck.kt86 val oldModifiers = old.modifiers in compare()
87 val newModifiers = new.modifiers in compare()
197 val oldModifiers = old.modifiers in compare()
198 val newModifiers = new.modifiers in compare()
321 val oldModifiers = old.modifiers in compare()
322 val newModifiers = new.modifiers in compare()
532 if (new.modifiers.isInline()) { in compare()
563 val oldModifiers = old.modifiers in compare()
564 val newModifiers = new.modifiers in compare()
574 val prevString = if (prevValue == null && !old.modifiers.isFinal()) { in compare()
[all …]
DAndroidApiChecks.kt178 … val annotation = method.modifiers.findAnnotation("android.support.annotation.RequiresPermission") in checkRequiresPermission()
219 … val hasBehavior = field.modifiers.findAnnotation("android.annotation.BroadcastBehavior") != null in checkIntentAction()
220 … val hasSdkConstant = field.modifiers.findAnnotation("android.annotation.SdkConstant") != null in checkIntentAction()
260 for (annotation in item.modifiers.annotations()) { in checkVariable()
262 val modifiers = cls.modifiers in checkVariable() constant
263 if (modifiers.findAnnotation(SdkConstants.INT_DEF_ANNOTATION.oldName()) != null || in checkVariable()
264 modifiers.findAnnotation(SdkConstants.INT_DEF_ANNOTATION.newName()) != null in checkVariable()
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiParameterItem.kt36 modifiers: PsiModifierItem,
41 modifiers = modifiers,
58 val annotation = modifiers.annotations().firstOrNull { it.isParameterName() } in name()
72 modifiers.annotations().any { it.isDefaultValue() } in hasDefaultValue()
154 val annotation = modifiers.annotations().firstOrNull { it.isDefaultValue() } in computeDefaultValue()
180 return psiParameter.isVarArgs || modifiers.isVarArg() in toString()
191 val modifiers = modifiers(codebase, psiParameter, commentText) in create() constant
199 modifiers = modifiers, in create()
202 parameter.modifiers.setOwner(parameter) in create()
216 modifiers = PsiModifierItem.create(codebase, original.modifiers), in create()
[all …]
DPsiMethodItem.kt53 modifiers: PsiModifierItem, in <lambda>()
60 modifiers = modifiers, in <lambda>()
285 modifierString, method.modifiers, method, in <lambda>()
313 parameterModifierString, parameter.modifiers, parameter, in <lambda>()
358 val modifiers = modifiers(codebase, psiMethod, commentText) in <lambda>() constant
359 if (modifiers.isFinal() && containingClass.modifiers.isFinal()) { in <lambda>()
364 modifiers.setFinal(false) in <lambda>()
395 modifiers = modifiers, in <lambda>()
399 method.modifiers.setOwner(method) in <lambda>()
414 modifiers = PsiModifierItem.create(codebase, original.modifiers), in <lambda>()
[all …]
DPsiConstructorItem.kt36 modifiers: PsiModifierItem, in <lambda>()
44 modifiers = modifiers, in <lambda>()
114 val modifiers = modifiers(codebase, psiMethod, commentText) in <lambda>() constant
125 modifiers = modifiers, in <lambda>()
130 constructor.modifiers.setOwner(constructor) in <lambda>()
143 val modifiers = PsiModifierItem(codebase, PACKAGE_PRIVATE, null) in <lambda>() constant
144 modifiers.setVisibilityLevel(containingClass.modifiers.getVisibilityLevel()) in <lambda>()
152 modifiers = modifiers, in <lambda>()
157 modifiers.setOwner(item) in <lambda>()
DPsiPackageItem.kt28 modifiers: PsiModifierItem,
33 modifiers = modifiers,
137 val modifiers = modifiers(codebase, psiPackage, commentText) in create() constant
138 if (modifiers.isPackagePrivate()) { in create()
140 modifiers.setVisibilityLevel(VisibilityLevel.PUBLIC) in create()
149 modifiers = modifiers in create()
151 pkg.modifiers.setOwner(pkg) in create()
161 modifiers = PsiModifierItem.create(codebase, original.modifiers) in create()
163 pkg.modifiers.setOwner(pkg) in create()
DPsiClassItem.kt57 modifiers: PsiModifierItem, in <lambda>()
62 modifiers = modifiers, in <lambda>()
389 …private fun hasExplicitRetention(modifiers: PsiModifierItem, psiClass: PsiClass, isKotlin: Boolean… in <lambda>()
390 if (modifiers.findAnnotation("java.lang.annotation.Retention") != null) { in <lambda>()
393 if (modifiers.findAnnotation("kotlin.annotation.Retention") != null) { in <lambda>()
423 val modifiers = modifiers(codebase, psiClass, commentText) in <lambda>() constant
433 modifiers = modifiers in <lambda>()
436 item.modifiers.setOwner(item) in <lambda>()
454 !hasExplicitRetention(modifiers, psiClass, isKotlin) in <lambda>()
457 modifiers.addAnnotation( in <lambda>()
[all …]
DPsiPropertyItem.kt33 modifiers: PsiModifierItem,
39 modifiers = modifiers,
82 val modifiers = modifiers(codebase, psiMethod, commentText) in toString() constant
90 modifiers = modifiers, in toString()
93 property.modifiers.setOwner(property) in toString()
DPsiTypeParameterItem.kt30 modifiers: PsiModifierItem
40 modifiers = modifiers,
67 val modifiers = modifiers(codebase, psiClass, "") in create() constant
73 modifiers = modifiers in create()
75 item.modifiers.setOwner(item) in create()
DPsiFieldItem.kt33 modifiers: PsiModifierItem,
41 modifiers = modifiers,
119 val modifiers = modifiers(codebase, psiField, commentText) in toString() constant
131 modifiers = modifiers, in toString()
136 field.modifiers.setOwner(field) in toString()
DPsiItem.kt36 override val modifiers: PsiModifierItem, constant in com.android.tools.metalava.model.psi.PsiItem
41 override var deprecated: Boolean = modifiers.isDeprecated()
75 modifiers.hasHideAnnotations() in <lambda>()
78 …override var hidden: Boolean by LazyDelegate { originallyHidden && !modifiers.hasShowAnnotation() } in <lambda>()
94 override fun mutableModifiers(): MutableModifierList = modifiers in isCloned()
225 modifiers.setOwner(this) in finishInitialization()
263 fun modifiers( in modifiers() method
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DItem.kt41 val modifiers: ModifierList constant
163 fun hasShowAnnotation(): Boolean = modifiers.hasShowAnnotation() in isHiddenOrRemoved()
164 fun hasShowForStubPurposesAnnotation(): Boolean = modifiers.hasShowForStubPurposesAnnotation() in isHiddenOrRemoved()
165 fun hasHideAnnotation(): Boolean = modifiers.hasHideAnnotations() in isHiddenOrRemoved()
166 fun hasHideMetaAnnotation(): Boolean = modifiers.hasHideMetaAnnotations() in isHiddenOrRemoved()
189 return modifiers.checkLevel() in isHiddenOrRemoved()
254 val modifiers = mutableModifiers() in psi() constant
255 modifiers.removeAnnotation(annotation) in psi()
258modifiers.addAnnotation(codebase.createAnnotation("@$annotationClass", this, mapName = false)) in psi()
377 override val isPublic: Boolean get() = modifiers.isPublic()
[all …]
DModifierList.kt237 modifiers: ModifierList, in <lambda>()
254 class AbstractFiltering : ModifierList by modifiers { in <lambda>()
256 return if (removeAbstract) false else modifiers.isAbstract() in <lambda>()
260 return if (removeFinal) false else modifiers.isFinal() in <lambda>()
264 … return if (addPublic) VisibilityLevel.PUBLIC else modifiers.getVisibilityLevel() in <lambda>()
269 modifiers in <lambda>()
DMethodItem.kt56 !containingClass().modifiers.isStatic() in <lambda>()
289 if (!method.modifiers.equivalentTo(superMethod.modifiers)) { in <lambda>()
381 if (!modifiers.hasNullnessInfo()) { in <lambda>()
397 return isConstructor() && modifiers.isPublic() && parameters().isEmpty() in <lambda>()
/tools/metalava/src/main/java/com/android/tools/metalava/stub/
DJavaStubWriter.kt84 val removeAbstract = cls.modifiers.isAbstract() && (cls.isEnum() || cls.isAnnotationType()) in <lambda>()
124 list = field.modifiers, in <lambda>()
148 appendModifiers(item, item.modifiers, removeAbstract, removeFinal, addPublic) in <lambda>()
153 modifiers: ModifierList, in <lambda>()
161 writer, modifiers, item, in <lambda>()
340 val modifiers = method.modifiers in <lambda>() constant
356 … val removeAbstract = modifiers.isAbstract() && (isEnum || isAnnotation) || movedFromInterface in <lambda>()
358 appendModifiers(method, modifiers, removeAbstract, movedFromInterface) in <lambda>()
383 …if (modifiers.isAbstract() && !removeAbstract && !isEnum || isAnnotation || modifiers.isNative()) { in <lambda>()
412 … field.modifiers.isFinal() && field.initialValue(true) == null && field.containingClass().isClass() in <lambda>()
[all …]
DKotlinStubWriter.kt72 val removeAbstract = cls.modifiers.isAbstract() && (cls.isEnum() || cls.isAnnotationType()) in <lambda>()
74 appendModifiers(cls, cls.modifiers, removeAbstract) in <lambda>()
108 modifiers: ModifierList, in <lambda>()
116 writer, modifiers, item, in <lambda>()
212 val modifiers = method.modifiers in <lambda>() constant
224 val removeAbstract = modifiers.isAbstract() && (isEnum || isAnnotation) in <lambda>()
226 appendModifiers(method, modifiers, removeAbstract, false) in <lambda>()
245 if (modifiers.isAbstract() && !isEnum || isAnnotation || modifiers.isNative()) { in <lambda>()
270 parameter.modifiers, in <lambda>()
/tools/metalava/src/test/java/com/android/tools/metalava/
DRewriteAnnotationsTest.kt117 val modifiers = annotationClass.modifiers in Test rewriting the bytecode for one of the public annotations() constant
118 assertEquals(0, modifiers and Modifier.PUBLIC) in Test rewriting the bytecode for one of the public annotations()
154 val modifiers = annotationClass.modifiers in Test rewriting the bytecode for one of the public annotations in a jar file() constant
155 assertEquals(0, modifiers and Modifier.PUBLIC) in Test rewriting the bytecode for one of the public annotations in a jar file()
/tools/tradefederation/core/lite/com/android/tradefed/lite/
DHostUtils.java170 int modifiers = cls.getModifiers(); in testLoadClass() local
172 && !Modifier.isStatic(modifiers) in testLoadClass()
173 && !Modifier.isPrivate(modifiers) in testLoadClass()
174 && !Modifier.isProtected(modifiers) in testLoadClass()
175 && !Modifier.isInterface(modifiers) in testLoadClass()
176 && !Modifier.isAbstract(modifiers)) { in testLoadClass()

123