Name
annotated by — Returns the object that is annotated by an annotation
Description
This expression applies to an annotation
object and returns the object that it annotates, which can be a
class,
method,
field or
argument.
Since the returned type is unknown, you will often use annotated by
in conjunction with the cast
operator if you want to further process the results.
Example
The following query returns the objects annotated by annotations with the class org.junit.After