Package ftbsc.geb.processor
Class GEBProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- ftbsc.geb.processor.GEBProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@SupportedAnnotationTypes("ftbsc.geb.api.annotations.Listen") public class GEBProcessor extends javax.annotation.processing.AbstractProcessor
GEB'sannotation processor
, which takes care of generating thedispatchers
.
-
-
Constructor Summary
Constructors Constructor Description GEBProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.lang.model.SourceVersion
getSupportedSourceVersion()
Sets the supported source version to the latest one.void
init(javax.annotation.processing.ProcessingEnvironment env)
Initializes the processor with the given environment.boolean
process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment env)
The starting point of the processor.
-
-
-
Method Detail
-
init
public void init(javax.annotation.processing.ProcessingEnvironment env)
Initializes the processor with the given environment. Also takes carae of initializing the TypeMirror "constants" for later use.- Specified by:
init
in interfacejavax.annotation.processing.Processor
- Overrides:
init
in classjavax.annotation.processing.AbstractProcessor
- Parameters:
env
- the environment
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment env)
The starting point of the processor. It callsprocessListener(Element)
on all elements annotated with theListen
annotation.- Specified by:
process
in interfacejavax.annotation.processing.Processor
- Specified by:
process
in classjavax.annotation.processing.AbstractProcessor
- Parameters:
annotations
- the annotation types requested to be processedenv
- environment for information about the current and prior round- Returns:
- whether the set of annotation types are claimed by this processor
-
getSupportedSourceVersion
public javax.lang.model.SourceVersion getSupportedSourceVersion()
Sets the supported source version to the latest one. It's either that or constant warnings, and the processor is simple enough.- Specified by:
getSupportedSourceVersion
in interfacejavax.annotation.processing.Processor
- Overrides:
getSupportedSourceVersion
in classjavax.annotation.processing.AbstractProcessor
- Returns:
- the latest source version
-
-