/external/robolectric-shadows/processor/src/main/java/org/robolectric/annotation/processing/ |
D | RobolectricModel.java | 22 import javax.lang.model.element.TypeElement; 66 private final static ElementVisitor<TypeElement, Void> TYPE_ELEMENT_VISITOR = 67 new SimpleElementVisitor6<TypeElement, Void>() { 69 public TypeElement visitType(TypeElement e, Void p) { 84 private final Map<TypeElement, TypeElement> importMap = newHashMap(); 85 private final Map<TypeElement, String> referentMap = newHashMap(); 86 private HashMultimap<String, TypeElement> typeMap = HashMultimap.create(); 92 public void addShadowType(TypeElement shadowType, TypeElement actualType, in addShadowType() 93 TypeElement shadowPickerType) { in addShadowType() 94 TypeElement shadowBaseType = null; in addShadowType() [all …]
|
D | Helpers.java | 19 import javax.lang.model.element.TypeElement; 37 private static final ElementVisitor<TypeElement, Void> TYPE_ELEMENT_VISITOR = 38 new SimpleElementVisitor6<TypeElement, Void>() { 40 public TypeElement visitType(TypeElement e, Void p) { 65 public static TypeElement getAnnotationTypeMirrorValue(Element el) { in getAnnotationTypeMirrorValue() 89 TypeElement annotation) { in getAnnotationMirror() 100 TypeElement typeElement) { in getImplementsMirror() 174 TypeElement impElement = elements.getTypeElement(classNameString.replace('$', '.')); in getImplementedClassName() 201 String getPackageOf(TypeElement typeElement) { in getPackageOf() 206 String getBinaryName(TypeElement typeElement) { in getBinaryName() [all …]
|
/external/dagger2/java/dagger/internal/codegen/ |
D | ModuleValidator.java | 78 import javax.lang.model.element.TypeElement; 121 private final Map<TypeElement, ValidationReport<TypeElement>> cache = new HashMap<>(); 122 private final Set<TypeElement> knownModules = new HashSet<>(); 156 void addKnownModules(Collection<TypeElement> modules) { in addKnownModules() 161 ValidationReport<TypeElement> validate(TypeElement module) { in validate() 165 private ValidationReport<TypeElement> validate( in validate() 166 TypeElement module, Set<TypeElement> visitedModules) { in validate() 173 private ValidationReport<TypeElement> validateUncached( in validateUncached() 174 TypeElement module, Set<TypeElement> visitedModules) { in validateUncached() 175 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(module); in validateUncached() [all …]
|
D | ConfigurationAnnotations.java | 47 import javax.lang.model.element.TypeElement; 58 static Optional<TypeElement> getSubcomponentCreator(TypeElement subcomponent) { in getSubcomponentCreator() 60 for (TypeElement nestedType : typesIn(subcomponent.getEnclosedElements())) { in getSubcomponentCreator() 97 static ImmutableSet<TypeElement> getTransitiveModules( in getTransitiveModules() 98 DaggerTypes types, DaggerElements elements, Iterable<TypeElement> seedModules) { in getTransitiveModules() 100 Queue<TypeElement> moduleQueue = new ArrayDeque<>(); in getTransitiveModules() 102 Set<TypeElement> moduleElements = Sets.newLinkedHashSet(); in getTransitiveModules() 103 for (TypeElement moduleElement : consumingIterable(moduleQueue)) { in getTransitiveModules() 107 ImmutableSet.Builder<TypeElement> moduleDependenciesBuilder = in getTransitiveModules() 115 ImmutableSet<TypeElement> moduleDependencies = moduleDependenciesBuilder.build(); in getTransitiveModules() [all …]
|
D | AnnotationCreatorGenerator.java | 49 import javax.lang.model.element.TypeElement; 80 class AnnotationCreatorGenerator extends SourceFileGenerator<TypeElement> { 90 ClassName nameGeneratedType(TypeElement annotationType) { in nameGeneratedType() 95 Element originatingElement(TypeElement annotationType) { in originatingElement() 100 Optional<TypeSpec.Builder> write(ClassName generatedTypeName, TypeElement annotationType) { in write() 106 for (TypeElement annotationElement : annotationsToCreate(annotationType)) { in write() 113 private MethodSpec buildCreateMethod(ClassName generatedTypeName, TypeElement annotationElement) { in buildCreateMethod() 141 protected Set<TypeElement> annotationsToCreate(TypeElement annotationElement) { in annotationsToCreate() 146 private static Set<TypeElement> nestedAnnotationElements( in nestedAnnotationElements() 147 TypeElement annotationElement, Set<TypeElement> annotationElements) { in nestedAnnotationElements() [all …]
|
D | ComponentProcessingStep.java | 44 import javax.lang.model.element.TypeElement; 50 final class ComponentProcessingStep extends TypeCheckingProcessingStep<TypeElement> { 63 private ImmutableMap<Element, ValidationReport<TypeElement>> creatorReportsByComponent; 64 private ImmutableMap<Element, ValidationReport<TypeElement>> creatorReportsBySubcomponent; 65 private ImmutableMap<Element, ValidationReport<TypeElement>> reportsBySubcomponent; 120 TypeElement element, ImmutableSet<Class<? extends Annotation>> annotations) { in process() 129 private void processRootComponent(TypeElement component) { in processRootComponent() 147 private void processSubcomponent(TypeElement subcomponent) { in processSubcomponent() 180 private ImmutableMap<Element, ValidationReport<TypeElement>> processCreators( in processCreators() 184 Map<Element, ValidationReport<TypeElement>> reports = new HashMap<>(); in processCreators() [all …]
|
D | SubcomponentFactoryMethodValidator.java | 43 import javax.lang.model.element.TypeElement; 51 private final Map<ComponentNode, Set<TypeElement>> inheritedModulesCache = new HashMap<>(); 75 ImmutableSet<TypeElement> missingModules = findMissingModules(edge, bindingGraph); in visitGraph() 83 private ImmutableSet<TypeElement> findMissingModules( in findMissingModules() 85 ImmutableSet<TypeElement> factoryMethodParameters = in findMissingModules() 88 SetView<TypeElement> modulesOwnedByChild = ownedModules(child, graph); in findMissingModules() 105 private ImmutableSet<TypeElement> subgraphFactoryMethodParameters( in subgraphFactoryMethodParameters() 114 private SetView<TypeElement> ownedModules(ComponentNode component, BindingGraph graph) { in ownedModules() 120 private Set<TypeElement> inheritedModules(ComponentNode component, BindingGraph graph) { in inheritedModules() 125 private Function<ComponentNode, Set<TypeElement>> uncachedInheritedModules(BindingGraph graph) { in uncachedInheritedModules() [all …]
|
D | ModuleDescriptor.java | 57 import javax.lang.model.element.TypeElement; 63 abstract TypeElement moduleElement(); in moduleElement() 65 abstract ImmutableSet<TypeElement> includedModules(); in includedModules() 109 private final Map<TypeElement, ModuleDescriptor> cache = new HashMap<>(); 127 ModuleDescriptor create(TypeElement moduleElement) { in create() 131 ModuleDescriptor createUncached(TypeElement moduleElement) { in createUncached() 171 ImmutableSet<ModuleDescriptor> transitiveModules(Iterable<TypeElement> modules) { in transitiveModules() 179 private Set<TypeElement> collectIncludedModules( in collectIncludedModules() 180 Set<TypeElement> includedModules, TypeElement moduleElement) { in collectIncludedModules() 184 TypeElement superclassElement = MoreTypes.asTypeElement(superclass); in collectIncludedModules() [all …]
|
D | ComponentHierarchyValidator.java | 46 import javax.lang.model.element.TypeElement; 59 ValidationReport<TypeElement> validate(ComponentDescriptor componentDescriptor) { in validate() 60 ValidationReport.Builder<TypeElement> report = in validate() 79 ImmutableMap<TypeElement, TypeElement> existingModuleToOwners) { in validateSubcomponentMethods() argument 96 new ImmutableMap.Builder<TypeElement, TypeElement>() in validateSubcomponentMethods() 110 ImmutableMap<TypeElement, TypeElement> existingModuleToOwners) { in validateFactoryMethodParameters() argument 113 TypeElement moduleType = MoreTypes.asTypeElement(factoryMethodParameter.asType()); in validateFactoryMethodParameters() 114 TypeElement originatingComponent = existingModuleToOwners.get(moduleType); in validateFactoryMethodParameters() 132 ValidationReport.Builder<TypeElement> report, in validateScopeHierarchy() 171 ValidationReport.Builder<TypeElement> report, in validateProductionModuleUniqueness() [all …]
|
D | ModuleProcessingStep.java | 41 import javax.lang.model.element.TypeElement; 47 final class ModuleProcessingStep extends TypeCheckingProcessingStep<TypeElement> { 53 private final SourceFileGenerator<TypeElement> moduleConstructorProxyGenerator; 56 private final Set<TypeElement> processedModuleElements = Sets.newLinkedHashSet(); 65 @ModuleGenerator SourceFileGenerator<TypeElement> moduleConstructorProxyGenerator, in ModuleProcessingStep() 87 List<TypeElement> modules = typesIn(elementsByAnnotation.values()); in process() 94 TypeElement module, ImmutableSet<Class<? extends Annotation>> annotations) { in process() 98 ValidationReport<TypeElement> report = moduleValidator.validate(module); in process() 121 private ContributionBinding bindsMethodBinding(TypeElement module, ExecutableElement method) { in bindsMethodBinding()
|
D | InjectValidator.java | 43 import javax.lang.model.element.TypeElement; 100 ValidationReport<TypeElement> validateConstructor(ExecutableElement constructorElement) { in validateConstructor() 101 ValidationReport.Builder<TypeElement> builder = in validateConstructor() 135 TypeElement enclosingElement = in validateConstructor() 236 ValidationReport<TypeElement> validateMembersInjectionType(TypeElement typeElement) { in validateMembersInjectionType() 239 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(typeElement); in validateMembersInjectionType() 265 ValidationReport<TypeElement> report = validateType(MoreTypes.asTypeElement(superclass)); in validateMembersInjectionType() 273 ValidationReport<TypeElement> validateType(TypeElement typeElement) { in validateType() 274 ValidationReport.Builder<TypeElement> builder = ValidationReport.about(typeElement); in validateType() 275 ValidationReport<TypeElement> membersInjectionReport = in validateType() [all …]
|
D | ComponentAnnotation.java | 40 import javax.lang.model.element.TypeElement; 104 ImmutableList<TypeElement> dependencies() { in dependencies() 121 ImmutableSet<TypeElement> modules() { in modules() 133 static Optional<ComponentAnnotation> rootComponentAnnotation(TypeElement typeElement) { in rootComponentAnnotation() 141 static Optional<ComponentAnnotation> subcomponentAnnotation(TypeElement typeElement) { in subcomponentAnnotation() 149 static Optional<ComponentAnnotation> anyComponentAnnotation(TypeElement typeElement) { in anyComponentAnnotation() 154 TypeElement typeElement, Collection<Class<? extends Annotation>> annotations) { in anyComponentAnnotation() 229 ImmutableList<TypeElement> dependencies() { in dependencies() 252 ImmutableSet<TypeElement> modules() { in modules() 317 ImmutableSet<TypeElement> modules() { in modules()
|
D | ModuleConstructorProxyGenerator.java | 37 import javax.lang.model.element.TypeElement; 46 final class ModuleConstructorProxyGenerator extends SourceFileGenerator<TypeElement> { 57 ClassName nameGeneratedType(TypeElement moduleElement) { in nameGeneratedType() 62 Element originatingElement(TypeElement moduleElement) { in originatingElement() 67 Optional<TypeSpec.Builder> write(ClassName generatedTypeName, TypeElement moduleElement) { in write() 74 private TypeSpec.Builder buildProxy(ClassName generatedTypeName, TypeElement moduleElement) { in buildProxy()
|
D | ComponentDescriptorValidator.java | 62 import javax.lang.model.element.TypeElement; 102 ValidationReport<TypeElement> validate(ComponentDescriptor component) { in validate() 111 final Map<ComponentDescriptor, ValidationReport.Builder<TypeElement>> reports = 119 ValidationReport<TypeElement> buildReport() { in buildReport() 120 ValidationReport.Builder<TypeElement> report = in buildReport() 127 private ValidationReport.Builder<TypeElement> report(ComponentDescriptor component) { in report() 157 ComponentDescriptor component, TypeElement dependency, Deque<TypeElement> dependencyStack) { in validateComponentDependencyHierarchy() 176 for (TypeElement nextDependency : componentAnnotation.dependencies()) { in validateComponentDependencyHierarchy() 192 ImmutableSet<TypeElement> scopedDependencies = in validateDependencyScopes() 412 TypeElement dependency, in validateDependencyScopeHierarchy() [all …]
|
D | ComponentDescriptorFactory.java | 48 import javax.lang.model.element.TypeElement; 73 ComponentDescriptor rootComponentDescriptor(TypeElement typeElement) { in rootComponentDescriptor() 83 ComponentDescriptor subcomponentDescriptor(TypeElement typeElement) { in subcomponentDescriptor() 96 ComponentDescriptor moduleComponentDescriptor(TypeElement typeElement) { in moduleComponentDescriptor() 105 TypeElement typeElement, in checkAnnotation() 106 Function<TypeElement, Optional<A>> annotationFunction, in checkAnnotation() argument 114 TypeElement typeElement, ComponentAnnotation componentAnnotation) { in create() 134 ImmutableSet<TypeElement> modules = in create() 145 TypeElement subcomponent = subcomponentDeclaration.subcomponentType(); in create() 212 TypeElement componentElement, in getDescriptorForComponentMethod() [all …]
|
D | ComponentCreatorValidator.java | 41 import javax.lang.model.element.TypeElement; 60 public ValidationReport<TypeElement> validate(TypeElement type) { in validate() 61 ValidationReport.Builder<TypeElement> report = ValidationReport.about(type); in validate() 98 private final TypeElement type; 100 private final ValidationReport.Builder<TypeElement> report; 105 TypeElement type, in ElementValidator() 106 ValidationReport.Builder<TypeElement> report, in ElementValidator() 116 final ValidationReport<TypeElement> validate() { in validate() 326 TypeElement componentType = MoreElements.asType(component); in validateFactoryMethodReturnType() 383 private ImmutableSet<ExecutableElement> methodsOnlyInComponent(TypeElement componentType) { in methodsOnlyInComponent()
|
D | ComponentValidator.java | 78 import javax.lang.model.element.TypeElement; 125 abstract ValidationReport<TypeElement> report(); in report() 133 TypeElement subject, in validate() 136 ValidationReport.Builder<TypeElement> report = ValidationReport.about(subject); in validate() 164 TypeElement subject, in validate() 169 ValidationReport.Builder<TypeElement> report) { in validate() 314 private void checkConflictingEntryPoints(ValidationReport.Builder<TypeElement> report) { in checkConflictingEntryPoints() 344 private ImmutableSet<Key> distinctKeys(Set<ExecutableElement> methods, TypeElement component) { in distinctKeys() 352 private DependencyRequest dependencyRequest(ExecutableElement method, TypeElement component) { in dependencyRequest() 377 Collection<ExecutableElement> methods, ValidationReport.Builder<TypeElement> report) { in reportConflictingEntryPoints() [all …]
|
D | MonitoringModuleGenerator.java | 44 import javax.lang.model.element.TypeElement; 47 final class MonitoringModuleGenerator extends SourceFileGenerator<TypeElement> { 55 ClassName nameGeneratedType(TypeElement componentElement) { in nameGeneratedType() 60 Element originatingElement(TypeElement componentElement) { in originatingElement() 65 Optional<TypeSpec.Builder> write(ClassName generatedTypeName, TypeElement componentElement) { in write() 87 private MethodSpec monitor(TypeElement componentElement) { in monitor()
|
/external/dagger2/java/dagger/model/ |
D | ComponentPath.java | 26 import javax.lang.model.element.TypeElement; 32 public static ComponentPath create(Iterable<TypeElement> components) { in create() 40 public abstract ImmutableList<TypeElement> components(); in components() 46 public final TypeElement rootComponent() { in rootComponent() 52 public TypeElement currentComponent() { in currentComponent() 61 public final TypeElement parentComponent() { in parentComponent() 78 public final ComponentPath childPath(TypeElement child) { in childPath() 79 return create(ImmutableList.<TypeElement>builder().addAll(components()).add(child).build()); in childPath() 92 return components().stream().map(TypeElement::getQualifiedName).collect(joining(" → ")); in toString()
|
/external/dagger2/java/dagger/internal/codegen/langmodel/ |
D | DaggerElements.java | 54 import javax.lang.model.element.TypeElement; 80 public static boolean elementEncloses(TypeElement encloser, Element enclosed) { in elementEncloses() 87 public ImmutableSet<ExecutableElement> getUnimplementedMethods(TypeElement type) { in getUnimplementedMethods() 94 public TypeElement getTypeElement(Class<?> clazz) { in getTypeElement() 99 public TypeElement getTypeElement(CharSequence name) { in getTypeElement() 104 public TypeElement getTypeElement(ClassName className) { in getTypeElement() 109 public static TypeElement closestEnclosingTypeElement(Element element) { in closestEnclosingTypeElement() 113 private static final ElementVisitor<TypeElement, Void> CLOSEST_ENCLOSING_TYPE_ELEMENT = 114 new SimpleElementVisitor8<TypeElement, Void>() { 116 protected TypeElement defaultAction(Element element, Void p) { [all …]
|
/external/javapoet/src/test/java/com/squareup/javapoet/ |
D | ClassNameTest.java | 20 import javax.lang.model.element.TypeElement; 107 TypeElement object = elements.getTypeElement(Object.class.getCanonicalName()); in classNameFromTypeElement() 109 TypeElement outer = elements.getTypeElement($Outer.class.getCanonicalName()); in classNameFromTypeElement() 111 TypeElement inner = elements.getTypeElement($Outer.$Inner.class.getCanonicalName()); in classNameFromTypeElement() 121 TypeElement object = elements.getTypeElement(Object.class.getCanonicalName()); in classNameFromTypeElementDoesntUseGetKind() 124 TypeElement outer = elements.getTypeElement($Outer.class.getCanonicalName()); in classNameFromTypeElementDoesntUseGetKind() 127 TypeElement inner = elements.getTypeElement($Outer.$Inner.class.getCanonicalName()); in classNameFromTypeElementDoesntUseGetKind() 133 private TypeElement preventGetKind(TypeElement object) { in preventGetKind() 134 TypeElement spy = Mockito.spy(object); in preventGetKind() 138 return enclosingElement instanceof TypeElement in preventGetKind() [all …]
|
/external/dagger2/javatests/dagger/internal/codegen/ |
D | ValidationReportTest.java | 30 import javax.lang.model.element.TypeElement; 52 Builder<TypeElement> reportBuilder = in basicReport() 71 Builder<TypeElement> reportBuilder = in messageOnDifferentElement() 93 Builder<TypeElement> reportBuilder = in subreport() 96 ValidationReport<TypeElement> parentReport = in subreport() 116 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { in process() 121 protected final TypeElement getTypeElement(Class<?> clazz) { in getTypeElement() 125 protected final TypeElement getTypeElement(String canonicalName) { in getTypeElement()
|
D | KeyFactoryTest.java | 44 import javax.lang.model.element.TypeElement; 73 TypeElement typeElement = in forInjectConstructorWithResolvedType() 90 TypeElement moduleElement = in forProvidesMethod() 108 TypeElement qualifierElement = in forProvidesMethod_qualified() 110 TypeElement moduleElement = in forProvidesMethod_qualified() 132 TypeElement moduleElement = in qualifiedKeyEquivalents() 139 TypeElement injectableElement = in qualifiedKeyEquivalents() 196 TypeElement setElement = elements.getTypeElement(Set.class.getCanonicalName()); in forProvidesMethod_sets() 199 TypeElement moduleElement = in forProvidesMethod_sets() 245 TypeElement primitiveHolder = elements.getTypeElement(PrimitiveTypes.class.getCanonicalName()); in primitiveKeysMatchBoxedKeys() [all …]
|
/external/dagger2/java/dagger/grpc/server/processor/ |
D | GrpcServiceModel.java | 39 import javax.lang.model.element.TypeElement; 54 final TypeElement serviceImplementation; 62 GrpcServiceModel(ProcessingEnvironment processingEnv, TypeElement serviceImplementation) { in GrpcServiceModel() 108 protected final TypeElement grpcClass() { 146 private TypeElement serviceImplBase(TypeMirror service) { 153 TypeElement serviceImplBase = serviceImplBase(type); 180 static final AnnotationValueVisitor<TypeElement, AnnotationValue> GET_TYPE_ELEMENT_FROM_VALUE = 181 new SimpleAnnotationValueVisitor7<TypeElement, AnnotationValue>() { 183 public TypeElement visitType(TypeMirror t, AnnotationValue p) { 188 protected TypeElement defaultAction(Object o, AnnotationValue p) {
|
/external/robolectric-shadows/processor/src/main/java/org/robolectric/annotation/processing/validator/ |
D | ImplementsValidator.java | 22 import javax.lang.model.element.TypeElement; 67 private TypeElement getClassNameTypeElement(AnnotationValue cv) { in getClassNameTypeElement() 73 public Void visitType(TypeElement shadowType, Element parent) { in visitType() 105 TypeElement actualType = null; in visitType() 163 : (TypeElement) types.asElement(shadowPickerTypeMirror)); in visitType() 167 private void addShadowNotInSdk(TypeElement shadowType, AnnotationValue av, AnnotationValue cv) { in addShadowNotInSdk() 193 static String getClassFQName(TypeElement elem) { in getClassFQName() 197 elem = (TypeElement) elem.getEnclosingElement(); in getClassFQName() 207 private void validateShadowMethods(TypeElement sdkClassElem, TypeElement shadowClassElem, in validateShadowMethods() 231 private void verifySdkMethod(TypeElement sdkClassElem, ExecutableElement methodElement, in verifySdkMethod() [all …]
|