com.sun.tools.javac.processing
Class JavacRoundEnvironment

java.lang.Object
  extended by com.sun.tools.javac.processing.JavacRoundEnvironment
All Implemented Interfaces:
RoundEnvironment

public class JavacRoundEnvironment
extends java.lang.Object
implements RoundEnvironment

Object providing state about a prior round of annotation processing.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Nested Class Summary
private  class JavacRoundEnvironment.AnnotationSetScanner
           
 
Field Summary
private  boolean errorRaised
           
private static java.lang.String NOT_AN_ANNOTATION_TYPE
           
private  ProcessingEnvironment processingEnv
           
private  boolean processingOver
           
private  java.util.Set<? extends Element> rootElements
           
 
Constructor Summary
JavacRoundEnvironment(boolean processingOver, boolean errorRaised, java.util.Set<? extends Element> rootElements, ProcessingEnvironment processingEnv)
           
 
Method Summary
 boolean errorRaised()
          Returns true if an error was raised in the prior round of processing; returns false otherwise.
 java.util.Set<? extends Element> getElementsAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> a)
          
 java.util.Set<? extends Element> getElementsAnnotatedWith(TypeElement a)
          Returns the elements annotated with the given annotation type.
 java.util.Set<? extends Element> getRootElements()
          Returns the type elements specified by the prior round.
 boolean processingOver()
          Returns true if types generated by this round will not be subject to a subsequent round of annotation processing; returns false otherwise.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processingOver

private final boolean processingOver

errorRaised

private final boolean errorRaised

processingEnv

private final ProcessingEnvironment processingEnv

rootElements

private final java.util.Set<? extends Element> rootElements

NOT_AN_ANNOTATION_TYPE

private static final java.lang.String NOT_AN_ANNOTATION_TYPE
See Also:
Constant Field Values
Constructor Detail

JavacRoundEnvironment

JavacRoundEnvironment(boolean processingOver,
                      boolean errorRaised,
                      java.util.Set<? extends Element> rootElements,
                      ProcessingEnvironment processingEnv)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

processingOver

public boolean processingOver()
Description copied from interface: RoundEnvironment
Returns true if types generated by this round will not be subject to a subsequent round of annotation processing; returns false otherwise.

Specified by:
processingOver in interface RoundEnvironment
Returns:
true if types generated by this round will not be subject to a subsequent round of annotation processing; returns false otherwise

errorRaised

public boolean errorRaised()
Returns true if an error was raised in the prior round of processing; returns false otherwise.

Specified by:
errorRaised in interface RoundEnvironment
Returns:
true if an error was raised in the prior round of processing; returns false otherwise.

getRootElements

public java.util.Set<? extends Element> getRootElements()
Returns the type elements specified by the prior round.

Specified by:
getRootElements in interface RoundEnvironment
Returns:
the types elements specified by the prior round, or an empty set if there were none

getElementsAnnotatedWith

public java.util.Set<? extends Element> getElementsAnnotatedWith(TypeElement a)
Returns the elements annotated with the given annotation type. Only type elements included in this round of annotation processing, or declarations of members, parameters, or type parameters declared within those, are returned. Included type elements are specified types and any types nested within them.

Specified by:
getElementsAnnotatedWith in interface RoundEnvironment
Parameters:
a - annotation type being requested
Returns:
the elements annotated with the given annotation type, or an empty set if there are none

getElementsAnnotatedWith

public java.util.Set<? extends Element> getElementsAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> a)

Specified by:
getElementsAnnotatedWith in interface RoundEnvironment
Parameters:
a - annotation type being requested
Returns:
the elements annotated with the given annotation type, or an empty set if there are none