Home
last modified time | relevance | path

Searched refs:TypeElement (Results 1 – 25 of 58) sorted by relevance

123

/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DMapKeyGenerator.java40 import javax.lang.model.element.TypeElement;
66 abstract TypeElement mapKeyElement(); in mapKeyElement()
73 abstract TypeElement annotationElement(); in annotationElement()
78 static MapKeyCreatorSpecification wrappedMapKey(TypeElement mapKeyElement) { in wrappedMapKey()
87 TypeElement mapKeyElement, TypeElement annotationElement) { in unwrappedMapKeyWithAnnotationValue()
121 for (TypeElement annotationElement : in write()
129 private void writeCreateMethod(TypeWriter mapKeyCreatorWriter, TypeElement annotationElement) { in writeCreateMethod()
151 private static Set<TypeElement> nestedAnnotationElements(TypeElement annotationElement) { in nestedAnnotationElements()
152 return nestedAnnotationElements(annotationElement, new LinkedHashSet<TypeElement>()); in nestedAnnotationElements()
155 private static Set<TypeElement> nestedAnnotationElements( in nestedAnnotationElements()
[all …]
DComponentProcessingStep.java32 import javax.lang.model.element.TypeElement;
82 final Map<Element, ValidationReport<TypeElement>> builderReportsByComponent = in componentElementValidator()
86 final Map<Element, ValidationReport<TypeElement>> builderReportsBySubcomponent = in componentElementValidator()
89 final Map<Element, ValidationReport<TypeElement>> reportsBySubcomponent = in componentElementValidator()
93 boolean validateComponent(TypeElement componentTypeElement, Messager messager) { in componentElementValidator()
107 private Map<Element, ValidationReport<TypeElement>> processComponentBuilders(
109 Map<Element, ValidationReport<TypeElement>> builderReportsByComponent = Maps.newHashMap();
111 ValidationReport<TypeElement> report =
119 private Map<Element, ValidationReport<TypeElement>> processSubcomponentBuilders(
121 Map<Element, ValidationReport<TypeElement>> builderReportsBySubcomponent = Maps.newHashMap();
[all …]
DComponentHierarchyValidator.java26 import javax.lang.model.element.TypeElement;
35 ValidationReport<TypeElement> validate(ComponentDescriptor componentDescriptor) { in validate()
43 private ValidationReport<TypeElement> validateSubcomponentMethods( in validateSubcomponentMethods()
45 Map<TypeElement, TypeElement> existingModuleToOwners) { in validateSubcomponentMethods() argument
46 ValidationReport.Builder<TypeElement> reportBuilder = in validateSubcomponentMethods()
57 TypeElement origininatingComponent = in validateSubcomponentMethods()
74 for (Map.Entry<TypeElement, ExecutableElement> builderMethodEntry : in validateSubcomponentMethods()
76 TypeElement origininatingComponent = in validateSubcomponentMethods()
103 new ImmutableMap.Builder<TypeElement, TypeElement>() in validateSubcomponentMethods()
DComponentDescriptor.java44 import javax.lang.model.element.TypeElement;
90 static Optional<Kind> forAnnotatedElement(TypeElement element) { in forAnnotatedElement()
132 abstract TypeElement componentDefinitionType(); in componentDefinitionType()
137 abstract ImmutableSet<TypeElement> dependencies(); in dependencies()
161 ImmutableSet<TypeElement> transitiveModuleTypes() { in transitiveModuleTypes()
182 abstract ImmutableMap<ExecutableElement, TypeElement> dependencyMethodIndex(); in dependencyMethodIndex()
187 abstract Optional<TypeElement> executorDependency(); in executorDependency()
231 abstract TypeElement builderDefinitionType();
232 abstract Map<TypeElement, ExecutableElement> methodMap();
258 ComponentDescriptor forComponent(TypeElement componentDefinitionType) {
[all …]
DConfigurationAnnotations.java41 import javax.lang.model.element.TypeElement;
63 static boolean isComponent(TypeElement componentDefinitionType) { in isComponent()
163 static ImmutableSet<TypeElement> getTransitiveModules( in getTransitiveModules()
164 Types types, Elements elements, Iterable<TypeElement> seedModules) { in getTransitiveModules()
166 Queue<TypeElement> moduleQueue = new ArrayDeque<>(); in getTransitiveModules()
168 Set<TypeElement> moduleElements = Sets.newLinkedHashSet(); in getTransitiveModules()
169 for (TypeElement moduleElement = moduleQueue.poll(); in getTransitiveModules()
175 ImmutableSet.Builder<TypeElement> moduleDependenciesBuilder = ImmutableSet.builder(); in getTransitiveModules()
182 ImmutableSet<TypeElement> moduleDependencies = moduleDependenciesBuilder.build(); in getTransitiveModules()
184 for (TypeElement dependencyType : moduleDependencies) { in getTransitiveModules()
[all …]
DModuleDescriptor.java16 import javax.lang.model.element.TypeElement;
31 static final Function<ModuleDescriptor, TypeElement> getModuleElement() { in getModuleElement()
32 return new Function<ModuleDescriptor, TypeElement>() { in getModuleElement()
33 @Override public TypeElement apply(ModuleDescriptor input) { in getModuleElement()
41 abstract TypeElement moduleElement();
68 ModuleDescriptor create(TypeElement moduleElement) {
98 private static Optional<AnnotationMirror> getModuleAnnotation(TypeElement moduleElement) {
104 Set<ModuleDescriptor> includedModules, TypeElement moduleElement) {
108 TypeElement superclassElement = MoreTypes.asTypeElement(superclass);
DProductionComponentProcessingStep.java29 import javax.lang.model.element.TypeElement;
75 final Map<Element, ValidationReport<TypeElement>> builderReportsByComponent = in componentElementValidator()
79 boolean validateComponent(TypeElement componentTypeElement, Messager messager) { in componentElementValidator()
80 ValidationReport<TypeElement> validationReport = in componentElementValidator()
92 private Map<Element, ValidationReport<TypeElement>> processComponentBuilders(
94 Map<Element, ValidationReport<TypeElement>> builderReportsByComponent = Maps.newHashMap();
96 ValidationReport<TypeElement> report =
DModuleValidator.java40 import javax.lang.model.element.TypeElement;
93 ValidationReport<TypeElement> validate(final TypeElement subject) { in validate()
94 final ValidationReport.Builder<TypeElement> builder = ValidationReport.about(subject); in validate()
119 TypeElement subject, ValidationReport.Builder<TypeElement> builder) { in validateModifiers()
128 ValidationReport.Builder<TypeElement> builder, in validateMethodsWithSameName()
143 TypeElement subject, ValidationReport.Builder<TypeElement> builder) { in validateReferencedModules()
154 final TypeElement subject, in validateReferencedModules()
155 final ValidationReport.Builder<TypeElement> builder, in validateReferencedModules()
168 final TypeElement element = MoreElements.asType(t.asElement()); in validateReferencedModules()
217 TypeElement subject, in validateProvidesOverrides()
[all …]
DComponentValidator.java39 import javax.lang.model.element.TypeElement;
121 abstract ValidationReport<TypeElement> report(); in report()
128 public ComponentValidationReport validate(final TypeElement subject, in validate()
131 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(subject); in validate()
250 private void validateSubcomponentMethod(final ValidationReport.Builder<TypeElement> builder, in validateSubcomponentMethod()
256 ImmutableSet<TypeElement> moduleTypes = in validateSubcomponentMethod()
263 ImmutableSet<TypeElement> transitiveModules = in validateSubcomponentMethod()
266 Set<TypeElement> variableTypes = Sets.newHashSet(); in validateSubcomponentMethod()
271 Optional<TypeElement> moduleType = parameterType.accept( in validateSubcomponentMethod()
272 new SimpleTypeVisitor6<Optional<TypeElement>, Void>() { in validateSubcomponentMethod()
[all …]
DBindingGraphValidator.java59 import javax.lang.model.element.TypeElement;
141 final ValidationReport.Builder<TypeElement> reportBuilder;
154 ValidationReport<TypeElement> buildReport() { in buildReport()
193 ExecutableElement factoryMethod, TypeElement subcomponentType) { in validateSubcomponentFactoryMethod()
195 FluentIterable<TypeElement> missingModules = in validateSubcomponentFactoryMethod()
199 new Predicate<TypeElement>() { in validateSubcomponentFactoryMethod()
201 public boolean apply(TypeElement moduleType) { in validateSubcomponentFactoryMethod()
216 private ImmutableSet<TypeElement> subgraphFactoryMethodParameters( in subgraphFactoryMethodParameters()
487 TypeElement element = MoreElements.asType(type.asElement()); in validateMembersInjectionBinding()
521 TypeElement componentType = descriptor.componentDefinitionType(); in validateComponentHierarchy()
[all …]
DBinding.java33 import javax.lang.model.element.TypeElement;
135 TypeElement bindingTypeElement() { in bindingTypeElement()
139 private static final ElementVisitor<TypeElement, Void> BINDING_TYPE_ELEMENT =
140 new SimpleElementVisitor6<TypeElement, Void>() {
142 protected TypeElement defaultAction(Element e, Void p) {
147 public TypeElement visitType(TypeElement e, Void p) {
195 TypeElement typeElement = MoreElements.asType(t.asElement()); in nonPublicPackageUse()
236 static boolean hasNonDefaultTypeParameters(TypeElement element, TypeMirror type, Types types) { in hasNonDefaultTypeParameters()
DMonitoringModuleGenerator.java37 import javax.lang.model.element.TypeElement;
44 final class MonitoringModuleGenerator extends SourceFileGenerator<TypeElement> {
54 ClassName nameGeneratedType(TypeElement componentElement) { in nameGeneratedType()
59 Iterable<? extends Element> getOriginatingElements(TypeElement componentElement) { in getOriginatingElements()
64 Optional<? extends Element> getElementForErrorReporting(TypeElement componentElement) { in getElementForErrorReporting()
69 ImmutableSet<JavaWriter> write(ClassName generatedTypeName, TypeElement componentElement) { in write()
DProductionComponentValidator.java24 import javax.lang.model.element.TypeElement;
42 ValidationReport<TypeElement> validate(final TypeElement subject) { in validate()
43 final ValidationReport.Builder<TypeElement> builder = ValidationReport.about(subject); in validate()
68 TypeElement moduleElement = MoreElements.asType(t.asElement()); in validate()
DAbstractComponentProcessingStep.java25 import javax.lang.model.element.TypeElement;
65 TypeElement componentTypeElement = MoreElements.asType(element); in process()
70 ValidationReport<TypeElement> hierarchyReport = in process()
75 ValidationReport<TypeElement> graphReport = in process()
115 abstract boolean validateComponent(TypeElement componentTypeElement, Messager messager); in validateComponent()
DProvisionBinding.java29 import javax.lang.model.element.TypeElement;
123 TypeElement bindingTypeElement = in forInjectConstructor()
133 Optional.<TypeElement>absent(), in forInjectConstructor()
144 TypeElement typeElement = MoreElements.asType(type.asElement()); in membersInjectionRequest()
206 Optional.<TypeElement>absent(), in implicitMapOfProviderBinding()
213 ProvisionBinding forComponent(TypeElement componentDefinitionType) { in forComponent()
222 Optional.<TypeElement>absent(), in forComponent()
241 Optional.<TypeElement>absent(), in forComponentMethod()
249 ExecutableElement subcomponentBuilderMethod, TypeElement contributedBy) { in forSubcomponentBuilderMethod()
DKey.java39 import javax.lang.model.element.TypeElement;
124 TypeElement element = MoreElements.asType(type.asElement()); in isValidImplicitProvisionKey()
167 private TypeElement getSetElement() {
171 private TypeElement getMapElement() {
175 private TypeElement getProviderElement() {
179 private TypeElement getProducerElement() {
183 private TypeElement getClassElement(Class<?> cls) {
279 ExecutableElement method, TypeMirror valueType, TypeElement factoryType) {
350 TypeElement wrappingElement = getClassElement(wrappingClass);
DBindingGraph.java54 import javax.lang.model.element.TypeElement;
95 ImmutableSet<TypeElement> ownedModuleTypes() { in ownedModuleTypes()
114 ImmutableSet<TypeElement> componentRequirements() { in componentRequirements()
134 new Function<ContributionBinding, Set<TypeElement>>() { in componentRequirements()
136 public Set<TypeElement> apply(ContributionBinding input) { in componentRequirements()
138 ? ImmutableSet.<TypeElement>of() in componentRequirements()
148 ImmutableSet<TypeElement> availableDependencies() {
149 return new ImmutableSet.Builder<TypeElement>()
184 TypeElement componentDefinitionType = componentDescriptor.componentDefinitionType();
191 ImmutableSet<TypeElement> componentDependencyTypes = componentMirror.isPresent()
[all …]
DInjectConstructorValidator.java27 import javax.lang.model.element.TypeElement;
53 ValidationReport<TypeElement> validate(ExecutableElement constructorElement) { in validate()
54 ValidationReport.Builder<TypeElement> builder = in validate()
73 TypeElement enclosingElement = in validate()
DBuilderValidator.java31 import javax.lang.model.element.TypeElement;
62 public ValidationReport<TypeElement> validate(TypeElement subject) { in validate()
63 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(subject); in validate()
189 ValidationReport.Builder<TypeElement> builder, in error()
DUtil.java31 import javax.lang.model.element.TypeElement;
120 private static boolean requiresEnclosingInstance(TypeElement typeElement) { in requiresEnclosingInstance()
139 static boolean componentCanMakeNewInstances(TypeElement typeElement) { in componentCanMakeNewInstances()
173 Elements elements, TypeElement type) { in getUnimplementedMethods()
/external/dagger2/compiler/src/test/java/dagger/internal/codegen/
DValidationReportTest.java24 import javax.lang.model.element.TypeElement;
50 Builder<TypeElement> reportBuilder = in basicReport()
70 Builder<TypeElement> reportBuilder = in messageOnDifferentElement()
90 Builder<TypeElement> reportBuilder = in subreport()
93 ValidationReport<TypeElement> parentReport = in subreport()
114 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { in process()
119 protected final TypeElement getTypeElement(Class<?> clazz) { in getTypeElement()
123 protected final TypeElement getTypeElement(String canonicalName) { in getTypeElement()
DKeyTest.java34 import javax.lang.model.element.TypeElement;
68 TypeElement typeElement = in forInjectConstructorWithResolvedType()
86 TypeElement moduleElement = in forProvidesMethod()
106 TypeElement qualifierElement = in forProvidesMethod_qualified()
108 TypeElement moduleElement = in forProvidesMethod_qualified()
120 TypeElement moduleElement = in qualifiedKeyEquivalents()
128 TypeElement injectableElement = in qualifiedKeyEquivalents()
159 TypeElement setElement = elements.getTypeElement(Set.class.getCanonicalName()); in forProvidesMethod_sets()
162 TypeElement moduleElement = in forProvidesMethod_sets()
200 TypeElement primitiveHolder = elements.getTypeElement(PrimitiveTypes.class.getCanonicalName()); in primitiveKeysMatchBoxedKeys()
[all …]
/external/dagger2/compiler/src/test/java/dagger/internal/codegen/writer/
DClassNameTest.java22 import javax.lang.model.element.TypeElement;
80 TypeElement element = elements.getTypeElement(Object.class.getCanonicalName()); in classNameFromTypeElement()
87 TypeElement element = elements.getTypeElement(ClassNameTest.class.getCanonicalName()); in peerNamed_topLevelClass()
96 TypeElement element = elements.getTypeElement(OuterClass.class.getCanonicalName()); in peerNamed_nestedClass()
105 TypeElement element = elements.getTypeElement(InnerClass.class.getCanonicalName()); in peerNamed_deeplyNestedClass()
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/
DTypeNames.java20 import javax.lang.model.element.TypeElement;
71 ? ClassName.fromTypeElement((TypeElement) t.asElement()) in forTypeMirror()
73 ClassName.fromTypeElement((TypeElement) t.asElement()), in forTypeMirror()
DTypeWriter.java22 import javax.lang.model.element.TypeElement;
85 public void addImplementedType(TypeElement typeElement) { in addImplementedType()
93 public FieldWriter addField(TypeElement type, String name) { in addField()

123