public interface RoundEnvironment
Modifier and Type | Method | Description |
---|---|---|
boolean |
errorRaised() |
Returns true if an error was raised in the prior round of processing; returns false otherwise. |
Set |
getElementsAnnotatedWith |
Returns the elements annotated with the given annotation interface. |
Set |
getElementsAnnotatedWith |
Returns the elements annotated with the given annotation interface. |
default Set |
getElementsAnnotatedWithAny |
Returns the elements annotated with one or more of the given annotation interfaces. |
default Set |
getElementsAnnotatedWithAny |
Returns the elements annotated with one or more of the given annotation interfaces. |
Set |
getRootElements() |
Returns the root elements for annotation processing generated 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. |
boolean processingOver()
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()
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()
Set<? extends Element> getElementsAnnotatedWith(TypeElement a)
package-info
file for that package was created. Likewise, elements of a module are not considered included simply because a module-info
file for that module was created.a
- annotation interface being requestedIllegalArgumentException
- if the argument does not represent an annotation interfacedefault Set<? extends Element> getElementsAnnotatedWithAny(TypeElement... annotations)
getElementsAnnotatedWith(TypeElement)
on each annotation and adding those results to the result set. Finally, the contents of the result set are returned as an unmodifiable set.annotations
- annotation interfaces being requestedIllegalArgumentException
- if the any elements of the argument set do not represent an annotation interfaceSet<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a)
package-info
file for that package was created. Likewise, elements of a module are not considered included simply because a module-info
file for that module was created. Note: An implementation of this method typically performs an internal conversion from the runtime reflective representation of an annotation interface as a Class
object to a different representation used for annotation processing. The set of annotation interfaces present in the runtime context may differ from the set of annotation interfaces present in the context of annotation processing in a particular environmental configuration. If an runtime annotation interface is not present in the annotation processing context, the situation is not treated as an error and no elements are found for that annotation interface.
a
- annotation interface being requestedIllegalArgumentException
- if the argument does not represent an annotation interfacedefault Set<? extends Element> getElementsAnnotatedWithAny(Set<Class<? extends Annotation>> annotations)
Note: An implementation of this method typically performs an internal conversion from the runtime reflective representation of an annotation interface as a Class
object to a different representation used for annotation processing. The set of annotation interfaces present in the runtime context may differ from the set of annotation interfaces present in the context of annotation processing in a particular environmental configuration. If an runtime annotation interface is not present in the annotation processing context, the situation is not treated as an error and no elements are found for that annotation interface.
getElementsAnnotatedWith(Class)
on each annotation and adding those results to the result set. Finally, the contents of the result set are returned as an unmodifiable set.annotations
- annotation interfaces being requestedIllegalArgumentException
- if the any elements of the argument set do not represent an annotation interface
© 1993, 2023, 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.
https://docs.oracle.com/en/java/javase/21/docs/api/java.compiler/javax/annotation/processing/RoundEnvironment.html