| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public abstract class AbstractProcessor extends Object implements Processor
An abstract annotation processor designed to be a convenient superclass for most concrete annotation processors. This class examines annotation values to compute the {@linkplain #getSupportedOptions options}, {@linkplain #getSupportedAnnotationTypes annotations}, and {@linkplain #getSupportedSourceVersion source version} supported by its subtypes.
The getter methods may {@linkplain Messager#printMessage issue warnings} about noteworthy conditions using the facilities available after the processor has been {@linkplain #isInitialized initialized}.
Subclasses are free to override the implementation and specification of any of the methods in this class as long as the general {@link javax.annotation.processing.Processor Processor} contract for that method is obeyed.
Field Summary | |
---|---|
protected ProcessingEnvironment |
processingEnv
Processing environment providing by the tool framework. |
Constructor Summary | |
---|---|
protected |
Constructor for subclasses to call. |
Method Summary | |
---|---|
Iterable |
getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) Returns an empty iterable of completions. |
Set |
If the processor class is annotated with javax.annotation.processing.SupportedAnnotationTypes, return an unmodifiable set with the same set of strings as the annotation. |
Set |
If the processor class is annotated with javax.annotation.processing.SupportedOptions, return an unmodifiable set with the same set of strings as the annotation. |
SourceVersion |
If the processor class is annotated with javax.annotation.processing.SupportedSourceVersion, return the source version in the annotation. |
void |
init(ProcessingEnvironment processingEnv) Initializes the processor with the processing environment by setting the field to the value of the argument. |
protected boolean |
Returns if this object has been javax.annotation.processing.AbstractProcessor.init, otherwise. |
abstract boolean |
process(Set annotations, RoundEnvironment roundEnv) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ProcessingEnvironment processingEnv
Constructor Detail |
---|
protected AbstractProcessor()
Method Detail |
---|
public Iterable getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)
element
- {@inheritDoc}annotation
- {@inheritDoc}member
- {@inheritDoc}userText
- {@inheritDoc}public Set getSupportedAnnotationTypes()
public Set getSupportedOptions()
public SourceVersion getSupportedSourceVersion()
public synchronized void init(ProcessingEnvironment processingEnv)
processingEnv
- environment to access facilities the tool framework
provides to the processorprotected synchronized boolean isInitialized()
public abstract boolean process(Set annotations, RoundEnvironment roundEnv)
annotations
roundEnv
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |