public abstract class AbstractApplicationAnnotationProcessor extends AbstractProcessor
addExtensionConfiguration(java.lang.Object) addOriginatingElements(javax.lang.model.element.Element...) addJAXBRootClass(java.lang.Class) or the package of the JAXB root element type: addJAXBPackage(java.lang.String)processingEnv| Constructor and Description |
|---|
AbstractApplicationAnnotationProcessor()
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addExtensionConfiguration(Object extensionConfiguration)
Adds an extension configuration (an instance of a JAXB root class of the extension point).
|
protected static void |
addJAXBPackage(String jaxbPackageName)
Adds the JAXB package of the extension point.
|
protected static void |
addJAXBRootClass(Class<?> jaxbRootClass)
Adds the JAXB root class of the extension point.
|
protected static void |
addOriginatingElements(Element... originatingElements)
Adds the originating elements.
|
protected JAXBContext |
createJAXBContext()
Creates a JAXB context.
|
protected abstract boolean |
handleProcess(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv)
Handles the specific annotations.
|
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv)
Calls
handleProcess(java.util.Set, javax.annotation.processing.RoundEnvironment) and then writes the application file, if the processing is over. |
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, isInitializedpublic AbstractApplicationAnnotationProcessor()
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
handleProcess(java.util.Set, javax.annotation.processing.RoundEnvironment) and then writes the application file, if the processing is over.process in interface Processorprocess in class AbstractProcessorannotations - the annotationsroundEnv - the round environmentRoundEnvironment.processingOver()protected abstract boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
annotations - the annotationsroundEnv - the round environmentprotected JAXBContext createJAXBContext() throws JAXBException
JAXBExceptionprotected static void addJAXBRootClass(Class<?> jaxbRootClass)
jaxbRootClass - the JAXB root class of the extension pointExtensionPoint.getJAXBRootClass()protected static void addJAXBPackage(String jaxbPackageName)
jaxbPackageName - the JAXB package name of the extension pointExtensionPoint.getJAXBRootClass()protected static void addExtensionConfiguration(Object extensionConfiguration)
extensionConfiguration - an extension configuration to addaddJAXBRootClass(java.lang.Class)protected static void addOriginatingElements(Element... originatingElements)
originatingElements - the originating elementsCopyright © 2012–2019 Drombler. All rights reserved.