@SupportedOptions(value={"debug","verify"}) public class AutoServiceProcessor extends AbstractProcessor
AutoService annotations and generates the service provider
configuration files described in ServiceLoader.
Processor Options:
processingEnv| Constructor and Description |
|---|
AutoServiceProcessor() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<String> |
getSupportedAnnotationTypes() |
SourceVersion |
getSupportedSourceVersion() |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv)
For each class annotated with
AutoService
Verify the AutoService interface value is correct
Categorize the class by its service interface
For each AutoService interface
Create a file named META-INF/services/<interface>
For each AutoService annotated class for this interface
Create an entry in the file
|
getCompletions, getSupportedOptions, init, isInitializedpublic com.google.common.collect.ImmutableSet<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes in interface ProcessorgetSupportedAnnotationTypes in class AbstractProcessorpublic SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion in interface ProcessorgetSupportedSourceVersion in class AbstractProcessorpublic boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
AutoServiceAutoService interface value is correct
AutoService interface META-INF/services/<interface>
AutoService annotated class for this interface process in interface Processorprocess in class AbstractProcessorCopyright © 2024. All rights reserved.