Home » openjdk-7 » javax » annotation » processing » [javadoc | source]
javax.annotation.processing
abstract public class: AbstractProcessor [javadoc | source]
java.lang.Object
   javax.annotation.processing.AbstractProcessor

All Implemented Interfaces:
    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 Processor contract for that method is obeyed.

Field Summary
protected  ProcessingEnvironment processingEnv    Processing environment providing by the tool framework. 
Constructor:
 protected AbstractProcessor() 
Method from javax.annotation.processing.AbstractProcessor Summary:
getCompletions,   getSupportedAnnotationTypes,   getSupportedOptions,   getSupportedSourceVersion,   init,   isInitialized,   process
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.annotation.processing.AbstractProcessor Detail:
 public Iterable<Completion> getCompletions(Element element,
    AnnotationMirror annotation,
    ExecutableElement member,
    String userText) 
    Returns an empty iterable of completions.
 public Set<String> getSupportedAnnotationTypes() 
    If the processor class is annotated with SupportedAnnotationTypes , return an unmodifiable set with the same set of strings as the annotation. If the class is not so annotated, an empty set is returned.
 public Set<String> getSupportedOptions() 
    If the processor class is annotated with SupportedOptions , return an unmodifiable set with the same set of strings as the annotation. If the class is not so annotated, an empty set is returned.
 public SourceVersion getSupportedSourceVersion() 
 public synchronized  void init(ProcessingEnvironment processingEnv) 
    Initializes the processor with the processing environment by setting the {@code processingEnv} field to the value of the {@code processingEnv} argument. An {@code IllegalStateException} will be thrown if this method is called more than once on the same object.
 protected synchronized boolean isInitialized() 
    Returns {@code true} if this object has been {@linkplain #init initialized}, {@code false} otherwise.
 abstract public boolean process(Set<TypeElement> annotations,
    RoundEnvironment roundEnv)
    {@inheritDoc}