Package Summary  Overview Summary

class:AbstractProcessor [CHANGED]

  • All Implemented Interfaces:
    Processor


    public abstract class AbstractProcessor
    extends java.lang.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 options, annotationsannotation types , and source version supported by its subtypes.

    The getter methods may issue warnings about noteworthy conditions using the facilities available after the processor has been 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.

    Since:
    1.6
  • All Implemented Interfaces:
    Processor


    public abstract class AbstractProcessor
    extends java.lang.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 options, annotations, and source version supported by its subtypes.

    The getter methods may issue warnings about noteworthy conditions using the facilities available after the processor has been 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.

    Since:
    1.6
  • All Implemented Interfaces:
    Processor


    public abstract class AbstractProcessor
    extends java.lang.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 options, annotation types , and source version supported by its subtypes.

    The getter methods may issue warnings about noteworthy conditions using the facilities available after the processor has been 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.

    Since:
    1.6

field:processingEnv [NONE]

  • processingEnv

    protected ProcessingEnvironment processingEnv
    Processing environment providing by the tool framework.

constructor:AbstractProcessor-- [NONE]

  • AbstractProcessor

    protected AbstractProcessor()
    Constructor for subclasses to call.

method:getSupportedOptions-- [NONE]

  • getSupportedOptions

    public java.util.Set<java.lang.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.
    Specified by:
    getSupportedOptions in interface Processor
    Returns:
    the options recognized by this processor, or an empty set if none
    See Also:
    SupportedOptions

method:getSupportedAnnotationTypes-- [NONE]

  • getSupportedAnnotationTypes

    public java.util.Set<java.lang.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.
    Specified by:
    getSupportedAnnotationTypes in interface Processor
    Returns:
    the names of the annotation types supported by this processor, or an empty set if none
    See Also:
    SupportedAnnotationTypes

method:getSupportedSourceVersion-- [NONE]

method:init-javax.annotation.processing.ProcessingEnvironment- [NONE]

  • init

    public void init(ProcessingEnvironment processingEnv)
    Initializes the processor with the processing environment by setting the processingEnv field to the value of the processingEnv argument. An IllegalStateException will be thrown if this method is called more than once on the same object.
    Specified by:
    init in interface Processor
    Parameters:
    processingEnv - environment to access facilities the tool framework provides to the processor
    Throws:
    java.lang.IllegalStateException - if this method is called more than once.

method:process-java.util.Set-javax.annotation.processing.RoundEnvironment- [CHANGED]

  • process

    public abstract boolean process(java.util.Set<? extends TypeElement> annotations,
                                    RoundEnvironment roundEnv)
    Processes a set of annotation types on type elements originating from the prior round and returns whether or not these annotationsannotation types are claimed by this processor. If true is returned, the annotationsannotation types are claimed and subsequent processors will not be asked to process them; if false is returned, the annotationsannotation types are unclaimed and subsequent processors may be asked to process them. A processor may always return the same boolean value or may vary the result based on chosen criteria.

    The input set will be empty if the processor supports "*" and the root elements have no annotations. A Processor must gracefully handle an empty set of annotations.

    Specified by:
    process in interface Processor
    Parameters:
    annotations - the annotation types requested to be processed
    roundEnv - environment for information about the current and prior round
    Returns:
    whether or not the set of annotationsannotation types are claimed by this processor
  • process

    public abstract boolean process(java.util.Set<? extends TypeElement> annotations,
                                    RoundEnvironment roundEnv)
    Processes a set of annotation types on type elements originating from the prior round and returns whether or not these annotations are claimed by this processor. If true is returned, the annotations are claimed and subsequent processors will not be asked to process them; if false is returned, the annotations are unclaimed and subsequent processors may be asked to process them. A processor may always return the same boolean value or may vary the result based on chosen criteria.

    The input set will be empty if the processor supports "*" and the root elements have no annotations. A Processor must gracefully handle an empty set of annotations.

    Specified by:
    process in interface Processor
    Parameters:
    annotations - the annotation types requested to be processed
    roundEnv - environment for information about the current and prior round
    Returns:
    whether or not the set of annotations are claimed by this processor
  • process

    public abstract boolean process(java.util.Set<? extends TypeElement> annotations,
                                    RoundEnvironment roundEnv)
    Processes a set of annotation types on type elements originating from the prior round and returns whether or not these annotation types are claimed by this processor. If true is returned, the annotation types are claimed and subsequent processors will not be asked to process them; if false is returned, the annotation types are unclaimed and subsequent processors may be asked to process them. A processor may always return the same boolean value or may vary the result based on chosen criteria.

    The input set will be empty if the processor supports "*" and the root elements have no annotations. A Processor must gracefully handle an empty set of annotations.

    Specified by:
    process in interface Processor
    Parameters:
    annotations - the annotation types requested to be processed
    roundEnv - environment for information about the current and prior round
    Returns:
    whether or not the set of annotation types are claimed by this processor

method:getCompletions-javax.lang.model.element.Element-javax.lang.model.element.AnnotationMirror-javax.lang.model.element.ExecutableElement-java.lang.String- [NONE]

  • getCompletions

    public java.lang.Iterable<? extends Completion> getCompletions(Element element,
                                                                   AnnotationMirror annotation,
                                                                   ExecutableElement member,
                                                                   java.lang.String userText)
    Returns an empty iterable of completions.
    Specified by:
    getCompletions in interface Processor
    Parameters:
    element - the element being annotated
    annotation - the (perhaps partial) annotation being applied to the element
    member - the annotation member to return possible completions for
    userText - source code text to be completed
    Returns:
    suggested completions to the annotation

method:isInitialized-- [NONE]

  • isInitialized

    protected boolean isInitialized()
    Returns true if this object has been initialized, false otherwise.
    Returns:
    true if this object has been initialized, false otherwise.