public interface RoundEnvironment
An annotation processing tool framework will provide an annotation processor with an object implementing this interface so that the processor can query for information about a round of annotation processing.
boolean processingOver()
Returns true
if types generated by this round will not be subject to a subsequent round of annotation processing; returns false
otherwise.
true
if types generated by this round will not be subject to a subsequent round of annotation processing; returns false
otherwiseboolean errorRaised()
Returns true
if an error was raised in the prior round of processing; returns false
otherwise.
true
if an error was raised in the prior round of processing; returns false
otherwiseSet<? extends Element> getRootElements()
Returns the root elements for annotation processing generated by the prior round.
Set<? extends Element> getElementsAnnotatedWith(TypeElement a)
Returns the elements annotated with the given annotation type. The annotation may appear directly or be inherited. Only package elements and type elements included in this round of annotation processing, or declarations of members, constructors, parameters, or type parameters declared within those, are returned. Included type elements are root types and any member types nested within them. Elements in a package are not considered included simply because a package-info
file for that package was created.
a
- annotation type being requestedIllegalArgumentException
- if the argument does not represent an annotation typeSet<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a)
Returns the elements annotated with the given annotation type. The annotation may appear directly or be inherited. Only package elements and type elements included in this round of annotation processing, or declarations of members, constructors, parameters, or type parameters declared within those, are returned. Included type elements are root types and any member types nested within them. Elements in a package are not considered included simply because a package-info
file for that package was created.
a
- annotation type being requestedIllegalArgumentException
- if the argument does not represent an annotation type
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.