Home
last modified time | relevance | path

Searched refs:moduleAnnotation (Results 1 – 15 of 15) sorted by relevance

/external/dagger2/java/dagger/internal/codegen/
DModuleKind.java74 private final Class<? extends Annotation> moduleAnnotation; field in ModuleKind
76 ModuleKind(Class<? extends Annotation> moduleAnnotation) { in ModuleKind() argument
77 this.moduleAnnotation = moduleAnnotation; in ModuleKind()
86 Optional<AnnotationMirror> result = getAnnotationMirror(element, moduleAnnotation); in getModuleAnnotation()
88 result.isPresent(), "annotation %s is not present on type %s", moduleAnnotation, element); in getModuleAnnotation() local
94 return moduleAnnotation; in annotation()
DConfigurationAnnotations.java24 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
73 static ImmutableList<TypeMirror> getModuleInjects(AnnotationMirror moduleAnnotation) { in getModuleInjects() argument
74 checkNotNull(moduleAnnotation); in getModuleInjects()
75 return getTypeListValue(moduleAnnotation, "injects"); in getModuleInjects()
104 moduleAnnotation(moduleElement) in getTransitiveModules()
106 moduleAnnotation -> { in getTransitiveModules()
109 moduleDependenciesBuilder.addAll(moduleAnnotation.includes()); in getTransitiveModules()
150 moduleAnnotation(element) in addIncludesFromSuperclasses()
151 .ifPresent(moduleAnnotation -> builder.addAll(moduleAnnotation.includes())); in addIncludesFromSuperclasses()
DSubcomponentDeclaration.java51 abstract ModuleAnnotation moduleAnnotation(); in moduleAnnotation() method in SubcomponentDeclaration
70 ModuleAnnotation moduleAnnotation = ModuleAnnotation.moduleAnnotation(module).get(); in forModule() local
72 getAnnotationElementAndValue(moduleAnnotation.annotation(), "subcomponents").getKey(); in forModule()
73 for (TypeElement subcomponent : moduleAnnotation.subcomponents()) { in forModule()
81 moduleAnnotation)); in forModule()
DBindsInstanceMethodValidator.java21 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
57 moduleAnnotation(enclosingType) in checkAdditionalProperties()
58 .ifPresent(moduleAnnotation -> report.addError(didYouMeanBinds(moduleAnnotation))); in checkAdditionalProperties()
79 private static String didYouMeanBinds(ModuleAnnotation moduleAnnotation) { in didYouMeanBinds() argument
82 moduleAnnotation.annotationClass().getSimpleName()); in didYouMeanBinds()
DModuleValidator.java31 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
244 ModuleAnnotation moduleAnnotation = moduleAnnotation(moduleKind.getModuleAnnotation(subject)); in validateReferencedSubcomponents() local
246 moduleAnnotation.subcomponentsAsAnnotationValues()) { in validateReferencedSubcomponents()
255 moduleAnnotation.annotation(), in validateReferencedSubcomponents()
265 attributeType, moduleAnnotation.annotation(), builder); in validateReferencedSubcomponents()
272 moduleAnnotation.annotation(), in validateReferencedSubcomponents()
304 AnnotationMirror moduleAnnotation, in validateSubcomponentHasBuilder() argument
310 moduleSubcomponentsDoesntHaveCreator(subcomponentAttribute, moduleAnnotation), in validateSubcomponentHasBuilder()
312 moduleAnnotation); in validateSubcomponentHasBuilder() local
316 TypeElement subcomponent, AnnotationMirror moduleAnnotation) { in moduleSubcomponentsDoesntHaveCreator() argument
[all …]
DComponentAnnotation.java188 static ComponentAnnotation fromModuleAnnotation(ModuleAnnotation moduleAnnotation) { in fromModuleAnnotation() argument
189 return new AutoValue_ComponentAnnotation_FictionalComponentAnnotation(moduleAnnotation); in fromModuleAnnotation()
281 return moduleAnnotation().annotation(); in annotation()
291 return moduleAnnotation().annotationClass().equals(ProducerModule.class); in isProduction()
306 return moduleAnnotation().includesAsAnnotationValues(); in moduleValues()
321 abstract ModuleAnnotation moduleAnnotation(); in moduleAnnotation() method in ComponentAnnotation.FictionalComponentAnnotation
DModuleAnnotation.java119 static ModuleAnnotation moduleAnnotation(AnnotationMirror annotation) { in moduleAnnotation() method in ModuleAnnotation
131 static Optional<ModuleAnnotation> moduleAnnotation(TypeElement typeElement) { in moduleAnnotation() method in ModuleAnnotation
133 .map(ModuleAnnotation::moduleAnnotation); in moduleAnnotation()
DModuleDescriptor.java26 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
189 moduleAnnotation(moduleElement) in collectIncludedModules()
191 moduleAnnotation -> { in collectIncludedModules()
192 includedModules.addAll(moduleAnnotation.includes()); in collectIncludedModules()
DBindingDeclarationFormatter.java103 subcomponentDeclaration.moduleAnnotation().subcomponents(); in formatSubcomponentDeclaration()
120 subcomponentDeclaration.moduleAnnotation().annotationClass().getSimpleName(), in formatSubcomponentDeclaration()
DComponentCreatorDescriptor.java25 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
218 return moduleAnnotation(asTypeElement(type)).isPresent() in requirement()
DComponentValidator.java40 import static dagger.internal.codegen.ModuleAnnotation.moduleAnnotation;
504 if (moduleAnnotation(MoreTypes.asTypeElement(type)).isPresent()) {
DComponentDescriptorFactory.java101 typeElement, ModuleAnnotation::moduleAnnotation, "must have a module annotation"))); in moduleComponentDescriptor()
/external/dagger2/javatests/dagger/internal/codegen/
DBindsMethodValidationTest.java47 public BindsMethodValidationTest(Class<? extends Annotation> moduleAnnotation) { in BindsMethodValidationTest() argument
48 moduleDeclaration = "@" + moduleAnnotation.getCanonicalName() + " abstract class %s { %s }"; in BindsMethodValidationTest()
DMultibindsValidationTest.java43 public MultibindsValidationTest(Class<? extends Annotation> moduleAnnotation) { in MultibindsValidationTest() argument
44 moduleDeclaration = "@" + moduleAnnotation.getCanonicalName() + " abstract class %s { %s }"; in MultibindsValidationTest()
DBindsOptionalOfMethodValidationTest.java50 public BindsOptionalOfMethodValidationTest(Class<? extends Annotation> moduleAnnotation) { in BindsOptionalOfMethodValidationTest() argument
51 moduleDeclaration = "@" + moduleAnnotation.getCanonicalName() + " abstract class %s { %s }"; in BindsOptionalOfMethodValidationTest()