Name

annotated by — Returns the object that is annotated by an annotation

Synopsis

annotated by

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

annotated by annotations with class "org.junit.After"

Context

Count-Preserving

Applies to Type

annotation

Results in Type

object

browse-by-query home antlersoft free software sourceforge project page