public class ServiceAnnotationProcessor extends AbstractProcessor
Service
annotation and generates
META-INF/services style text file for each interface annotated with @ContractprocessingEnv
Constructor and Description |
---|
ServiceAnnotationProcessor()
Deprecated.
Creates a new instance of ServiceAnnotationProcessor
|
Modifier and Type | Method and Description |
---|---|
void |
init(ProcessingEnvironment processingEnv)
Deprecated.
|
protected void |
loadExistingMetaInfFiles()
Deprecated.
Loads all existing META-INF/services file from our destination directory
This is usuful because during incremental builds, not all source files
are recompiled, henve we cannot rewrite the META-INF/services file from
scratch each time, but append/remove entries from it as necessary.
|
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv)
Deprecated.
Annotation processor entry point, we are using a visitor pattern the visit
only the class declaration.
|
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
public ServiceAnnotationProcessor()
public void init(ProcessingEnvironment processingEnv)
init
in interface Processor
init
in class AbstractProcessor
protected void loadExistingMetaInfFiles()
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process
in interface Processor
process
in class AbstractProcessor
Copyright © 2015 Oracle Corporation. All rights reserved.