public abstract class GenProcessor extends AbstractProcessor
Abstract processor class for all @GenX
annotations.
SupportedAnnotationTypes
or override
AbstractProcessor.getSupportedAnnotationTypes()
to receive elements, that are
annotated in the current environment with one of the given annotations. You
can get access these elements using the method
process(Element annotatedElement)
.processingEnv
Constructor and Description |
---|
GenProcessor() |
Modifier and Type | Method and Description |
---|---|
ProcessingEnvironment |
getEnvironment()
Returns the current processing environment.
|
SourceVersion |
getSupportedSourceVersion() |
void |
init(ProcessingEnvironment environment) |
void |
onProcessingCompleted()
Utility method called after the processing is finished.
|
void |
onProcessingStarted()
Utility method called after processing has started.
|
void |
printError(String message)
Prints an error.
|
void |
printMessage(String message)
Prints a message.
|
abstract void |
process(Element annotatedElement)
Override this function to receive elements which you've declared in
supported annotations.
|
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnvironment) |
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
public void init(ProcessingEnvironment environment)
init
in interface Processor
init
in class AbstractProcessor
public ProcessingEnvironment getEnvironment()
public SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion
in interface Processor
getSupportedSourceVersion
in class AbstractProcessor
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment)
process
in interface Processor
process
in class AbstractProcessor
public void printMessage(String message)
message
- the messagepublic void printError(String message)
message
- the error messagepublic abstract void process(Element annotatedElement)
annotatedElement
- the annotated element.public void onProcessingStarted()
public void onProcessingCompleted()
Copyright © 2010-2014 ArcBees. All Rights Reserved.