Class AutoServiceProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
com.google.auto.service.processor.AutoServiceProcessor
- All Implemented Interfaces:
Processor
Processes
AutoService annotations and generates the service provider
configuration files described in ServiceLoader.
Processor Options:
-Adebug- turns on debug statements-Averify=true- turns on extra verification
-
Field Summary
Fields inherited from class AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<String> booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) For each class annotated withAutoServiceVerify theAutoServiceinterface value is correct Categorize the class by its service interface For eachAutoServiceinterface Create a file namedMETA-INF/services/<interface>For eachAutoServiceannotated class for this interface Create an entry in the fileMethods inherited from class AbstractProcessor
getCompletions, getSupportedOptions, init, isInitialized
-
Constructor Details
-
AutoServiceProcessor
public AutoServiceProcessor()
-
-
Method Details
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
process
- For each class annotated with
AutoService- Verify the
AutoServiceinterface value is correct - Categorize the class by its service interface
- Verify the
- For each
AutoServiceinterface- Create a file named
META-INF/services/<interface> - For each
AutoServiceannotated class for this interface- Create an entry in the file
- Create a file named
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
- For each class annotated with
-