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,
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.
Returns:
the elements annotated with the given annotation type,
or an empty set if there are none
Parameters:
-
a - annotation type being requested
Throws:
-
IllegalArgumentException - if the argument does not
represent an annotation type