public abstract class AbstractSPIServiceProcessor extends AbstractServiceProcessor
allowGenerics, annotationClass, elements, interfaceName, types| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSPIServiceProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
java.lang.Class<?> interfaceClass,
boolean allowGenerics)
Constructor
|
protected |
AbstractSPIServiceProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
java.lang.String interfaceName,
boolean allowGenerics)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
init(javax.annotation.processing.ProcessingEnvironment procEnv) |
protected void |
produceOutput()
Function that is called after all annotation processing is finished.
|
protected void |
visitClass(javax.lang.model.element.TypeElement classEle,
java.lang.String className)
Function that is called on every annotated class that is visited.
|
error, error, getSupportedAnnotationTypes, getSupportedSourceVersion, process, writeResourceListprotected AbstractSPIServiceProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
java.lang.Class<?> interfaceClass,
boolean allowGenerics)
annotationClass - Class object which describes the annotationinterfaceClass - Class object which describes the interface which the annotated classes must implementallowGenerics - Are generic implementations of the interface allowed? Else, they are an errorprotected AbstractSPIServiceProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
java.lang.String interfaceName,
boolean allowGenerics)
annotationClass - Class object which describes the annotationinterfaceName - Full Name of the interface which describes the interface which the annotated classes
must implementallowGenerics - Are generic implementations of the interface allowed? Else, they are an errorpublic void init(javax.annotation.processing.ProcessingEnvironment procEnv)
init in interface javax.annotation.processing.Processorinit in class AbstractServiceProcessorprotected void visitClass(javax.lang.model.element.TypeElement classEle,
java.lang.String className)
AbstractServiceProcessorprocess, every class that is
annotated with our annotation has some sanity-checks applied (e.g. does it implement the required interface)
and then this function is called on it.visitClass in class AbstractServiceProcessorclassEle - The TypeElement that represents the class that is being compiled.className - The name of the class represented by classEle.protected void produceOutput()
AbstractServiceProcessorproduceOutput in class AbstractServiceProcessorwriteResourceList