Home
last modified time | relevance | path

Searched refs:classItem (Results 1 – 25 of 32) sorted by relevance

12

/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/fielditem/
DSourceFieldItemTest.kt47 val classItem = codebase.assertClass("test.pkg.Test") in test field with default value as constant literal() constant
58 assertEquals(fieldValues, classItem.fields().map { it.initialValue(false) }) in test field with default value as constant literal()
59 assertEquals(fieldValues, classItem.fields().map { it.initialValue(true) }) in test field with default value as constant literal()
79 val classItem = codebase.assertClass("test.pkg.Test") in test field with default value as constant expression() constant
80 val fieldItem1 = classItem.assertField("field1") in test field with default value as constant expression()
81 val fieldItem2 = classItem.assertField("field2") in test field with default value as constant expression()
111 val classItem = codebase.assertClass("test.pkg.Test") in test field with default value as object reference() constant
112 val fieldItem1 = classItem.assertField("field1") in test field with default value as object reference()
113 val fieldItem2 = classItem.assertField("field2") in test field with default value as object reference()
136 val classItem = codebase.assertClass("test.pkg.Test") in test default value of an enum constant field() constant
[all …]
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/
DBootstrapSourceModelProviderTest.kt62 val classItem = codebase.assertClass("test.pkg.Test") in 030 - check simplest class() constant
63 assertEquals("test.pkg.Test", classItem.qualifiedName()) in 030 - check simplest class()
156 val classItem = codebase.assertClass("test.pkg.Test") in 080 - check inner class() constant
161 assertEquals(classItem, innerClassItem.containingClass()) in 080 - check inner class()
162 assertEquals(1, classItem.innerClasses().count(), message = "") in 080 - check inner class()
193 val classItem = codebase.assertClass("test.pkg.Test") in 090 - check class hierarchy() constant
198 assertEquals(superClassItem, classItem.superClass()) in 090 - check class hierarchy()
201 classItem.allInterfaces().toSet() in 090 - check class hierarchy()
253 val classItem = codebase.assertClass("test.pkg.Test") in 110 - advanced package test() constant
260 assertEquals(packageItem, classItem.containingPackage()) in 110 - advanced package test()
[all …]
DCommonModelTest.kt327 for (classItem in codebase.getPackages().allClasses()) { in Test iterate and resolve unknown super classes() method
329 classItem.superClass() in Test iterate and resolve unknown super classes()
371 for (classItem in codebase.getPackages().allClasses()) { in Test iterate and resolve unknown interface classes() method
372 for (interfaceType in classItem.interfaceTypes()) { in Test iterate and resolve unknown interface classes()
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/type/
DDefaultResolvedClassTypeItem.kt27 private val classItem: ClassItem, constant
31 override val qualifiedName = classItem.qualifiedName()
33 override val outerClassType = classItem.containingClass()?.type()
35 override val className = classItem.simpleName()
37 override fun asClass() = classItem in asClass()
43 return DefaultResolvedClassTypeItem(modifiers.duplicate(), classItem, arguments) in asClass()
47 fun createForClass(classItem: ClassItem): ClassTypeItem { in createForClass()
48 val arguments = classItem.typeParameterList.map { it.type() } in createForClass()
50 return DefaultResolvedClassTypeItem(modifiers, classItem, arguments) in createForClass()
/tools/metalava/metalava-model-text/src/main/java/com/android/tools/metalava/model/text/
DClassCharacteristics.kt73 fun of(classItem: TextClassItem): ClassCharacteristics =
75 fileLocation = classItem.fileLocation,
76 qualifiedName = classItem.qualifiedName,
77 fullName = classItem.fullName(),
78 classKind = classItem.classKind,
79 modifiers = classItem.modifiers,
80 superClassType = classItem.superClassType(),
DTextCodebase.kt80 fun registerClass(classItem: TextClassItem) { in <lambda>()
81 val qualifiedName = classItem.qualifiedName in <lambda>()
82 val existing = allClassesByName.put(qualifiedName, classItem) in <lambda>()
89 addClass(classItem) in <lambda>()
167 val classItem = classResolver.resolveClass(name) in <lambda>() constant
168 if (classItem != null) { in <lambda>()
171 externalClassesByName[name] = classItem in <lambda>()
172 return classItem in <lambda>()
/tools/metalava/metalava-model-turbine/src/main/java/com/android/tools/metalava/model/turbine/
DTurbineCodebaseInitialiser.kt258 var classItem = codebase.findClass(name) in <lambda>() variable
260 if (classItem == null) { in <lambda>()
280 classItem = codebase.findClass(name) in <lambda>()
285 return classItem in <lambda>()
338 val classItem = in <lambda>() constant
352 classItem.containingClass = containingClassItem in <lambda>()
356 if (!classItem.isInterface()) { in <lambda>()
361 classItem.setSuperClassType(superClassTypeItem) in <lambda>()
365 classItem.setInterfaceTypes( in <lambda>()
370 createFields(classItem, cls.fields(), classTypeItemFactory) in <lambda>()
[all …]
DTurbineBasedCodebase.kt97 fun registerClass(classItem: TurbineClassItem, isTopClass: Boolean) { in registerClass()
98 val qualifiedName = classItem.qualifiedName() in registerClass()
99 val existing = classMap.put(qualifiedName, classItem) in registerClass()
107 topLevelClassesFromSource.add(classItem) in registerClass()
110 addClass(classItem) in registerClass()
DTurbineSourceFile.kt71 val classItem = codebase.findClass(resolvedName) ?: continue in getImports() constant
72 if (predicate.test(classItem)) { in getImports()
73 imports.add(Import(classItem)) in getImports()
DTurbineFileLocation.kt65 fun forTree(classItem: ClassItem, tree: Tree?): FileLocation { in forTree()
66 val sourceFile = classItem.sourceFile() as? TurbineSourceFile ?: return UNKNOWN in forTree()
DTurbinePackageItem.kt84 internal fun addTopClass(classItem: TurbineClassItem) { in hashCode()
85 topClasses.add(classItem) in hashCode()
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/
DCodebase.kt128 protected fun addClass(classItem: ClassItem) { in addClass()
129 allClasses.add(classItem) in addClass()
147 val classItem = allClasses[i] in iterateAllClasses() constant
148 body(classItem) in iterateAllClasses()
161 iterateAllClasses { classItem -> in resolveSuperTypes() method
162 classItem.superClass() in resolveSuperTypes()
163 for (interfaceType in classItem.interfaceTypes()) { in resolveSuperTypes()
DTypeParameterScope.kt98 fun from(classItem: ClassItem?): TypeParameterScope { in isEmpty()
99 return if (classItem == null) empty in isEmpty()
102 from(classItem.containingClass()) in isEmpty()
106 classItem.typeParameterList, in isEmpty()
DModifierListWriter.kt119 val classItem = item as? ClassItem in <lambda>() constant
135 classItem?.isInterface() == true || methodItem?.containingClass()?.isInterface() == true in <lambda>()
146 classItem?.isEnum() != true && in <lambda>()
147 classItem?.isAnnotationType() != true && in <lambda>()
157 if (list.isStatic() && (classItem == null || !classItem.isEnum())) { in <lambda>()
168 classItem?.isEnum() != true && in <lambda>()
DAnnotationRetention.kt27 fun getDefault(classItem: ClassItem): AnnotationRetention { in getDefault()
28 return getDefault(classItem.isKotlin()) in getDefault()
DSourceFile.kt145 classItem: ClassItem
147 classItem.qualifiedName(),
148 classItem.simpleName(),
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/methoditem/
DSourceMethodItemTest.kt60 val classItem = codebase.assertClass("test.pkg.Test") in test duplicate() for methoditem() constant
62 val methodItem = classItem.methods().first() in test duplicate() for methoditem()
63 val methodItem1 = classItem.methods().last() in test duplicate() for methoditem()
82 assertEquals(classItem, duplicateMethod.inheritedFrom) in test duplicate() for methoditem()
99 assertEquals(classItem, duplicateMethod1.inheritedFrom) in test duplicate() for methoditem()
125 val classItem = codebase.assertClass("test.pkg.Test") in test inherited methods() constant
127 val methodItem = classItem.methods().first() in test inherited methods()
128 val methodItem1 = classItem.methods().last() in test inherited methods()
147 assertEquals(classItem, inheritedMethod.inheritedFrom) in test inherited methods()
165 assertEquals(classItem, inheritedMethod1.inheritedFrom) in test inherited methods()
/tools/metalava/metalava-model-psi/src/main/java/com/android/tools/metalava/model/psi/
DPsiSourceFile.kt99 val classItem = codebase.findClass(resolved) ?: continue in getImports() constant
100 if (predicate.test(classItem)) { in getImports()
101 imports.add(Import(classItem)) in getImports()
121 val classItem = in getImports() constant
124 classItem.findField( in getImports()
140 val classItem = codebase.findClass(resolved) ?: continue in getImports() constant
141 if (predicate.test(classItem)) { in getImports()
142 imports.add(Import(classItem)) in getImports()
DPsiBasedCodebase.kt308 private fun finishClassInitialization(classItem: PsiClassItem) { in <lambda>()
310 error("incorrectly called on $classItem when initializing=`true`") in <lambda>()
313 val pkgName = getPackageName(classItem.psiClass) in <lambda>()
319 packageItem.addClass(classItem) in <lambda>()
322 pkg.addClass(classItem) in <lambda>()
500 val classItem = createTopLevelClassAndContents(psiClass) in <lambda>() constant
501 topLevelClassesFromSource.add(classItem) in <lambda>()
506 list = mutableListOf(classItem) in <lambda>()
509 list.add(classItem) in <lambda>()
578 val classItem = in <lambda>() constant
[all …]
/tools/metalava/metalava-model-testsuite/src/main/java/com/android/tools/metalava/model/testsuite/sourcefile/
DSourceFileTest.kt101 val classItem = codebase.assertClass("test.pkg.Test") in test sourcefile imports() constant
105 val sourceFile = classItem.getSourceFile()!! in test sourcefile imports()
142 val classItem = codebase.assertClass("test.pkg.Test") in test sourcefile classes() constant
144 val sourceFile = classItem.sourceFile()!! in test sourcefile classes()
146 assertEquals(listOf(classItem, outerClassItem), sourceFile.classes().toList()) in test sourcefile classes()
/tools/metalava/metalava-model/src/testFixtures/java/com/android/tools/metalava/model/
DAssertions.kt28 val classItem = findClass(qualifiedName) in assertClass() constant
29 assertNotNull(classItem, message = "Expected $qualifiedName to be defined") in assertClass()
30 return classItem in assertClass()
35 val classItem = resolveClass(qualifiedName) in Codebase() constant
36 assertNotNull(classItem, message = "Expected $qualifiedName to be defined") in Codebase()
37 return classItem in Codebase()
/tools/metalava/metalava-model-text/src/test/java/com/android/tools/metalava/model/text/
DClassLoaderBasedClassResolverTest.kt28 val classItem = resolver.resolveClass(qualifiedName) in checkClassResolved() constant
29 assertNotNull(classItem) in checkClassResolved()
30 assertEquals(qualifiedName, classItem.qualifiedName()) in checkClassResolved()
/tools/metalava/metalava-model-psi/src/test/java/com/android/tools/metalava/model/psi/
DPsiParameterItemTest.kt98 val classItem = codebase.assertClass("Test") in actuals get params from expects() constant
99 assertEquals(actualFile, classItem.getSourceFile()) in actuals get params from expects()
101 val constructorItem = classItem.constructors().single() in actuals get params from expects()
108 val methodItem = classItem.methods().single() in actuals get params from expects()
DPsiMethodItemTest.kt34 val classItem = codebase.assertClass("Foo") in property accessors have properties() constant
35 val getter = classItem.methods().single { it.name() == "getBar" } in property accessors have properties()
36 val setter = classItem.methods().single { it.name() == "setBar" } in property accessors have properties()
50 val classItem = codebase.assertClass("Foo") in destructuring functions do not have a property relationship() constant
51 val component1 = classItem.methods().single { it.name() == "component1" } in destructuring functions do not have a property relationship()
/tools/metalava/metalava/src/main/java/com/android/tools/metalava/
DAnnotationsMerger.kt437 val classItem = codebase.findClass(containingClass) in <lambda>() constant
438 if (classItem == null) { in <lambda>()
461 classItem, in <lambda>()
468 mergeField(item, containingClass, classItem, fieldName) in <lambda>()
473 val classItem = codebase.findClass(containingClass) in <lambda>() constant
474 if (classItem == null) { in <lambda>()
483 mergeAnnotations(item, classItem) in <lambda>()
517 classItem: ClassItem, in <lambda>()
524 val methodItem: MethodItem? = classItem.findMethod(methodName, parameters) in <lambda>()
548 classItem: ClassItem, in <lambda>()
[all …]

12