Home
last modified time | relevance | path

Searched refs:typeElement (Results 1 – 25 of 86) sorted by relevance

1234

/external/smali/smalidea/src/test/java/org/jf/smalidea/
DSmaliClassTypeElementTest.java53 SmaliClassTypeElement typeElement = in testGetType() local
55 Assert.assertNotNull(typeElement); in testGetType()
56 SmaliClassType type = typeElement.getType(); in testGetType()
58 Assert.assertEquals("blarg", typeElement.getName()); in testGetType()
59 Assert.assertEquals("my.blarg", typeElement.getCanonicalText()); in testGetType()
63 SmaliClass resolvedClass = (SmaliClass)typeElement.resolve(); in testGetType()
84 SmaliClassTypeElement typeElement = in testSimpleInnerClass() local
86 Assert.assertNotNull(typeElement); in testSimpleInnerClass()
87 SmaliClassType type = typeElement.getType(); in testSimpleInnerClass()
89 Assert.assertEquals("Outer.Inner", typeElement.getQualifiedName()); in testSimpleInnerClass()
[all …]
DClassReferenceTest.java50 SmaliClassTypeElement typeElement = (SmaliClassTypeElement)configureByFileText( in testJavaReferenceFromSmali() local
53 Assert.assertNotNull(typeElement); in testJavaReferenceFromSmali()
54 Assert.assertEquals("Object", typeElement.getName()); in testJavaReferenceFromSmali()
56 PsiClass psiClass = typeElement.resolve(); in testJavaReferenceFromSmali()
60 JavaResolveResult resolveResult = typeElement.advancedResolve(false); in testJavaReferenceFromSmali()
64 JavaResolveResult[] resolveResults = typeElement.multiResolve(false); in testJavaReferenceFromSmali()
74 SmaliClassTypeElement typeElement = (SmaliClassTypeElement)configureByFileText( in testJavaReferenceFromSmaliInDumbMode() local
77 Assert.assertNotNull(typeElement); in testJavaReferenceFromSmaliInDumbMode()
78 Assert.assertEquals("Object", typeElement.getName()); in testJavaReferenceFromSmaliInDumbMode()
82 PsiClass psiClass = typeElement.resolve(); in testJavaReferenceFromSmaliInDumbMode()
[all …]
DSmaliFieldTest.java59 PsiTypeElement typeElement = fields[0].getTypeElement(); in testBasicField() local
60 Assert.assertNotNull("I", typeElement); in testBasicField()
61 Assert.assertEquals("I", typeElement.getText()); in testBasicField()
226 PsiTypeElement typeElement = fields[0].getTypeElement(); in testFieldAnnotations() local
227 Assert.assertNotNull("I", typeElement); in testFieldAnnotations()
228 Assert.assertEquals("I", typeElement.getText()); in testFieldAnnotations()
/external/dagger2/java/dagger/internal/codegen/kotlin/
DKotlinMetadataUtil.java86 public boolean isObjectClass(TypeElement typeElement) { in isObjectClass() argument
87 return hasMetadata(typeElement) in isObjectClass()
88 && metadataFactory.create(typeElement).classMetadata().flags(IS_OBJECT); in isObjectClass()
92 public boolean isDataClass(TypeElement typeElement) { in isDataClass() argument
93 return hasMetadata(typeElement) in isDataClass()
94 && metadataFactory.create(typeElement).classMetadata().flags(IS_DATA); in isDataClass()
98 public boolean isCompanionObjectClass(TypeElement typeElement) { in isCompanionObjectClass() argument
99 return hasMetadata(typeElement) in isCompanionObjectClass()
100 && metadataFactory.create(typeElement).classMetadata().flags(IS_COMPANION_OBJECT); in isCompanionObjectClass()
104 public boolean hasEnclosedCompanionObject(TypeElement typeElement) { in hasEnclosedCompanionObject() argument
[all …]
/external/dagger2/java/dagger/hilt/android/processor/internal/viewmodel/
DViewModelMetadata.kt35 val typeElement: TypeElement in <lambda>() constant in dagger.hilt.android.processor.internal.viewmodel.ViewModelMetadata
37 val className = ClassName.get(typeElement) in <lambda>()
40 MoreElements.getPackage(typeElement).qualifiedName.toString(), in <lambda>()
47 typeElement: TypeElement, in <lambda>()
54 typeElement.asType(), in <lambda>()
57 typeElement, in <lambda>()
62 ElementFilter.constructorsIn(typeElement.enclosedElements).filter { constructor -> in <lambda>()
72 typeElement, in <lambda>()
87 typeElement.nestingKind != NestingKind.MEMBER || in <lambda>()
88 typeElement.modifiers.contains(Modifier.STATIC), in <lambda>()
[all …]
DViewModelProcessor.kt47 val typeElement = MoreElements.asType(element) in <lambda>() constant
48 if (parsedElements.add(typeElement)) { in <lambda>()
51 typeElement, in <lambda>()
/external/turbine/javatests/com/google/turbine/processing/
DTurbineElementTest.java55 public void typeElement() { in typeElement() method in TurbineElementTest
56 TypeElement e = factory.typeElement(new ClassSymbol("java/util/Map$Entry")); in typeElement()
83 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in superClass()
90 e = factory.typeElement(new ClassSymbol("java/lang/annotation/ElementType")); in superClass()
100 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in interfaces()
114 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in typeParameters()
127 factory.typeElement(new ClassSymbol("java/lang/Integer")).getEnclosedElements().stream() in enclosed()
137 factory.typeElement(new ClassSymbol("java/util/List")), in equals()
138 factory.typeElement(new ClassSymbol("java/util/List"))) in equals()
139 .addEqualityGroup(factory.typeElement(new ClassSymbol("java/util/ArrayList"))) in equals()
[all …]
/external/dagger2/java/dagger/internal/codegen/binding/
DComponentRequirement.java99 public TypeElement typeElement() { in typeElement() method in ComponentRequirement
131 return componentCanMakeNewInstances(typeElement(), metadataUtil) in nullPolicy()
154 && !componentCanMakeNewInstances(typeElement(), metadataUtil); in requiresAPassedInstance()
170 metadataUtil.isObjectClass(typeElement()) in requiresModuleInstance()
171 || metadataUtil.isCompanionObjectClass(typeElement()); in requiresModuleInstance()
177 getLocalAndInheritedMethods(typeElement(), types, elements); in requiresModuleInstance()
250 TypeElement typeElement, KotlinMetadataUtil metadataUtil) { in componentCanMakeNewInstances() argument
251 switch (typeElement.getKind()) { in componentCanMakeNewInstances()
259 throw new AssertionError("TypeElement cannot have kind: " + typeElement.getKind()); in componentCanMakeNewInstances()
262 if (typeElement.getModifiers().contains(ABSTRACT)) { in componentCanMakeNewInstances()
[all …]
DComponentDescriptorFactory.java77 public ComponentDescriptor rootComponentDescriptor(TypeElement typeElement) { in rootComponentDescriptor() argument
79 typeElement, in rootComponentDescriptor()
81 typeElement, in rootComponentDescriptor()
87 public ComponentDescriptor subcomponentDescriptor(TypeElement typeElement) { in subcomponentDescriptor() argument
89 typeElement, in subcomponentDescriptor()
91 typeElement, in subcomponentDescriptor()
100 public ComponentDescriptor moduleComponentDescriptor(TypeElement typeElement) { in moduleComponentDescriptor() argument
102 typeElement, in moduleComponentDescriptor()
105 typeElement, ModuleAnnotation::moduleAnnotation, "must have a module annotation"))); in moduleComponentDescriptor()
109 TypeElement typeElement, in checkAnnotation() argument
[all …]
DComponentCreatorDescriptor.java64 public abstract TypeElement typeElement(); in typeElement() method in ComponentCreatorDescriptor
161 TypeElement typeElement = asTypeElement(type); in create() local
162 TypeMirror componentType = typeElement.getEnclosingElement().asType(); in create()
168 for (ExecutableElement method : elements.getUnimplementedMethods(typeElement)) { in create()
199 ComponentCreatorAnnotation annotation = getOnlyElement(getCreatorAnnotations(typeElement)); in create()
201 annotation, typeElement, factoryMethod, setterMethods.build(), factoryParameters.build()); in create()
/external/auto/value/src/main/java/com/google/auto/value/processor/
DTypeSimplifier.java120 TypeElement typeElement = MoreElements.asType(type.asElement()); in simplifiedClassName() local
121 TypeElement top = topLevelType(typeElement); in simplifiedClassName()
126 String suffix = typeElement.getQualifiedName().toString().substring(topString.length()); in simplifiedClassName()
129 return typeElement.getQualifiedName().toString(); in simplifiedClassName()
215 TypeElement typeElement = (TypeElement) typeUtils.asElement(type); in findImports() local
216 String fullName = typeElement.getQualifiedName().toString(); in findImports()
217 String simpleName = typeElement.getSimpleName().toString(); in findImports()
218 String pkg = packageNameOf(typeElement); in findImports()
226 spelling = javaLangSpelling(elementUtils, codePackageName, typeElement); in findImports()
249 Elements elementUtils, String codePackageName, TypeElement typeElement) { in javaLangSpelling() argument
[all …]
DOptionalish.java72 TypeElement typeElement = MoreElements.asType(declaredType.asElement()); in isOptional() local
73 return OPTIONAL_CLASS_NAMES.contains(typeElement.getQualifiedName().toString()) in isOptional()
74 && typeElement.getTypeParameters().size() == declaredType.getTypeArguments().size(); in isOptional()
/external/dagger2/java/dagger/internal/codegen/componentgenerator/
DComponentHjarGenerator.java95 return componentName(input.typeElement()); in nameGeneratedType()
100 return input.typeElement(); in originatingElement()
110 if (componentDescriptor.typeElement().getModifiers().contains(PUBLIC)) { in write()
114 TypeElement componentElement = componentDescriptor.typeElement(); in write()
122 builderMethodReturnType = ClassName.get(creatorDescriptor.typeElement()); in write()
130 if (componentDescriptor.typeElement().getModifiers().contains(PUBLIC)) { in write()
139 .map(requirement -> builderSetterMethod(requirement.typeElement(), builderClassName)) in write()
180 private MethodSpec emptyComponentMethod(TypeElement typeElement, ExecutableElement baseMethod) { in emptyComponentMethod() argument
181 return MethodSpec.overriding(baseMethod, MoreTypes.asDeclared(typeElement.asType()), types) in emptyComponentMethod()
206 ClassName.get(component.typeElement()).packageName())) in componentRequirements()
[all …]
/external/connectedappssdk/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/containers/
DCrossProfileTypeInfo.java122 TypeElement typeElement, in findProfileClassName() argument
124 return hasCrossProfileAnnotation(typeElement) in findProfileClassName()
125 ? findAnnotatedProfileClassName(context, typeElement, crossProfileType) in findProfileClassName()
126 : createDefaultProfileClassName(context, typeElement); in findProfileClassName()
130 ValidatorContext context, TypeElement typeElement) { in createDefaultProfileClassName() argument
131 PackageElement originalPackage = context.elements().getPackageOf(typeElement); in createDefaultProfileClassName()
133 String.format("Profile%s", typeElement.getSimpleName().toString()); in createDefaultProfileClassName()
140 TypeElement typeElement, in findAnnotatedProfileClassName() argument
147 return createDefaultProfileClassName(context, typeElement); in findAnnotatedProfileClassName()
/external/dagger2/java/dagger/internal/codegen/base/
DComponentAnnotation.java135 public static Optional<ComponentAnnotation> rootComponentAnnotation(TypeElement typeElement) { in rootComponentAnnotation() argument
136 return anyComponentAnnotation(typeElement, ROOT_COMPONENT_ANNOTATIONS); in rootComponentAnnotation()
143 public static Optional<ComponentAnnotation> subcomponentAnnotation(TypeElement typeElement) { in subcomponentAnnotation() argument
144 return anyComponentAnnotation(typeElement, SUBCOMPONENT_ANNOTATIONS); in subcomponentAnnotation()
151 public static Optional<ComponentAnnotation> anyComponentAnnotation(TypeElement typeElement) { in anyComponentAnnotation() argument
152 return anyComponentAnnotation(typeElement, ALL_COMPONENT_ANNOTATIONS); in anyComponentAnnotation()
156 TypeElement typeElement, Collection<Class<? extends Annotation>> annotations) { in anyComponentAnnotation() argument
157 return getAnyAnnotation(typeElement, annotations).map(ComponentAnnotation::componentAnnotation); in anyComponentAnnotation()
/external/dagger2/java/dagger/internal/codegen/validation/
DComponentHierarchyValidator.java65 ValidationReport.about(componentDescriptor.typeElement()); in validate()
69 Maps.toMap(componentDescriptor.moduleTypes(), constant(componentDescriptor.typeElement()))); in validate()
106 constant(childComponent.typeElement()))) in validateSubcomponentMethods()
157 .append(subject.typeElement().getQualifiedName()) in validateScopeHierarchy()
163 .append(entry.getKey().typeElement().getQualifiedName()) in validateScopeHierarchy()
170 subject.typeElement()); in validateScopeHierarchy()
199 formatter.format("%s repeats @ProducerModules:", componentDescriptor.typeElement()); in validateProductionModuleUniqueness()
203 formatter.format("\n %s also installs: ", entry.getKey().typeElement()); in validateProductionModuleUniqueness()
244 .append(component.typeElement().getQualifiedName()) in repeatedModulesWithScopeError()
253 .append(conflictingComponent.typeElement().getQualifiedName()) in repeatedModulesWithScopeError()
DInjectValidator.java315 public ValidationReport<TypeElement> validateMembersInjectionType(TypeElement typeElement) { in validateMembersInjectionType() argument
318 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(typeElement); in validateMembersInjectionType()
320 for (VariableElement element : ElementFilter.fieldsIn(typeElement.getEnclosedElements())) { in validateMembersInjectionType()
329 for (ExecutableElement element : ElementFilter.methodsIn(typeElement.getEnclosedElements())) { in validateMembersInjectionType()
340 checkInjectIntoPrivateClass(typeElement, builder); in validateMembersInjectionType()
341 checkInjectIntoKotlinObject(typeElement, builder); in validateMembersInjectionType()
343 TypeMirror superclass = typeElement.getSuperclass(); in validateMembersInjectionType()
353 public ValidationReport<TypeElement> validateType(TypeElement typeElement) { in validateType() argument
354 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(typeElement); in validateType()
356 validateMembersInjectionType(typeElement); in validateType()
[all …]
DComponentDescriptorValidator.java133 ValidationReport.about(rootComponent.typeElement()); in buildReport()
141 reports, component, descriptor -> ValidationReport.about(descriptor.typeElement())); in report()
147 .addItem(message, kind, component.typeElement(), component.annotation().annotation()); in reportComponentItem()
164 validateComponentDependencyHierarchy(component, component.typeElement(), new ArrayDeque<>()); in validateComponentDependencyHierarchy()
173 message.append(component.typeElement().getQualifiedName()); in validateComponentDependencyHierarchy()
212 .map(ComponentRequirement::typeElement) in validateDependencyScopes()
235 component, component.typeElement(), new ArrayDeque<>(), new ArrayDeque<>()); in validateDependencyScopes()
242 new StringBuilder(component.typeElement().getQualifiedName()) in validateDependencyScopes()
303 DeclaredType container = asDeclared(creator.typeElement().asType()); in validateCreators()
314 .addError(String.format(messages.extraSetters(), formatted), creator.typeElement()); in validateCreators()
[all …]
DInjectBindingRegistryImpl.java248 TypeElement typeElement = MoreElements.asType(constructorElement.getEnclosingElement()); in tryRegisterConstructor() local
249 DeclaredType type = MoreTypes.asDeclared(typeElement.asType()); in tryRegisterConstructor()
262 tryRegisterMembersInjectedType(typeElement, resolvedType, warnIfNotAlreadyGenerated); in tryRegisterConstructor()
270 public Optional<MembersInjectionBinding> tryRegisterMembersInjectedType(TypeElement typeElement) { in tryRegisterMembersInjectedType() argument
271 return tryRegisterMembersInjectedType(typeElement, Optional.empty(), false); in tryRegisterMembersInjectedType()
276 TypeElement typeElement, in tryRegisterMembersInjectedType() argument
279 DeclaredType type = MoreTypes.asDeclared(typeElement.asType()); in tryRegisterMembersInjectedType()
287 injectValidator.validateMembersInjectionType(typeElement); in tryRegisterMembersInjectedType()
/external/robolectric-shadows/processor/src/main/java/org/robolectric/annotation/processing/
DHelpers.java100 TypeElement typeElement) { in getImplementsMirror() argument
101 return getAnnotationMirror(types, elem, typeElement); in getImplementsMirror()
201 String getPackageOf(TypeElement typeElement) { in getPackageOf() argument
202 PackageElement name = typeElement == null ? null : elements.getPackageOf(typeElement); in getPackageOf()
206 String getBinaryName(TypeElement typeElement) { in getBinaryName() argument
207 Name name = typeElement == null ? null : elements.getBinaryName(typeElement); in getBinaryName()
/external/dagger2/java/dagger/hilt/processor/internal/definecomponent/
DDefineComponents.java178 TypeElement typeElement = MoreElements.asType(element); in from() local
180 Processors.hasAnnotation(typeElement, ClassNames.DEFINE_COMPONENT_CLASSES), in from()
181 typeElement, in from() local
183 typeElement, in from() local
185 typeElement.getAnnotationMirrors()); in from()
187 Optional<TypeElement> component = defineComponentClass(elements, typeElement, "component"); in from()
188 Optional<TypeElement> builder = defineComponentClass(elements, typeElement, "builder"); in from()
191 typeElement, in from() local
DDefineComponentProcessor.java72 private void generateFile(String member, TypeElement typeElement) throws IOException { in generateFile() argument
74 TypeSpec.interfaceBuilder(Processors.getFullEnclosedName(typeElement)) in generateFile()
75 .addOriginatingElement(typeElement) in generateFile()
78 .addMember(member, "$S", typeElement.getQualifiedName()) in generateFile()
/external/dagger2/java/dagger/internal/codegen/writing/
DSubcomponentNames.java103 subcomponent.creatorDescriptor().get().typeElement().asType()), in descriptorsByCreatorKey()
128 return component.typeElement().getSimpleName().toString(); in simpleName()
133 TypeElement typeElement = component.typeElement(); in uniquingPrefix() local
134 String containerName = typeElement.getEnclosingElement().getSimpleName().toString(); in uniquingPrefix()
142 Name qualifiedName = typeElement.getQualifiedName(); in uniquingPrefix()
/external/smali/smalidea/src/main/java/org/jf/smalidea/psi/stub/element/
DSmaliFieldElementType.java69 SmaliTypeElement typeElement = psi.getTypeElement(); in createStub() local
70 if (typeElement != null) { in createStub()
71 fieldSmaliTypeName = typeElement.getSmaliName(); in createStub()
/external/dagger2/java/dagger/hilt/android/processor/internal/androidentrypoint/
DBroadcastReceiverGenerator.java100 private static boolean isOnReceiveImplemented(TypeElement typeElement) { in isOnReceiveImplemented() argument
102 ElementFilter.methodsIn(typeElement.getEnclosedElements()).stream() in isOnReceiveImplemented()
109 } else if (typeElement.getSuperclass().getKind() != TypeKind.NONE) { in isOnReceiveImplemented()
110 return isOnReceiveImplemented(MoreTypes.asTypeElement(typeElement.getSuperclass())); in isOnReceiveImplemented()

1234