You can retrieve the backport175 annotations as well as regular Java 5 annotations (when running Java5) at runtime using the API in the
You retreive the annotations by specifying the:
- name of the annotations - this must be the fully qualified name of the annotation interface.
- class or member that is annotated - this is the
java.lang.Class(for class level annotations) or one of the member class in the
java.lang.reflect.*package for member level annotations (methods, fields and constructors)
All these methods return an instance of the type
This class has some useful methods like:
But most likely you want to cast the instance to the correct annotation type (interface).