This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.annotation.processing
class AbstractProcessor

java.lang.Object extended by javax.annotation.processing.AbstractProcessor
All Implemented Interfaces:
Processor

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

processingEnv

protected ProcessingEnvironment processingEnv
Processing environment providing by the tool framework.
Constructor Detail

AbstractProcessor

protected AbstractProcessor()
Constructor for subclasses to call.

Method Detail

getCompletions

public Iterable getCompletions(Element element,
                               AnnotationMirror annotation,
                               ExecutableElement member,
                               String userText)
Returns an empty iterable of completions.

Parameters:
element - {@inheritDoc}
annotation - {@inheritDoc}
member - {@inheritDoc}
userText - {@inheritDoc}

getSupportedAnnotationTypes

public Set getSupportedAnnotationTypes()
If the processor class is annotated with {@link 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.

Returns:
the names of the annotation types supported by this processor, or an empty set if none

getSupportedOptions

public Set getSupportedOptions()
If the processor class is annotated with {@link 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.

Returns:
the options recognized by this processor, or an empty set if none

getSupportedSourceVersion

public SourceVersion getSupportedSourceVersion()
If the processor class is annotated with {@link SupportedSourceVersion}, return the source version in the annotation. If the class is not so annotated, {@link SourceVersion#RELEASE_6} is returned.

Returns:
the latest source version supported by this processor

init

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.

Parameters:
processingEnv - environment to access facilities the tool framework provides to the processor

isInitialized

protected synchronized boolean isInitialized()
Returns {@code true} if this object has been {@linkplain #init initialized}, {@code false} otherwise.

Returns:
{@code true} if this object has been initialized, {@code false} otherwise.

process

public abstract boolean process(Set annotations,
                                RoundEnvironment roundEnv)
{@inheritDoc}

Parameters:
annotations
roundEnv


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.