Mega Code Archive

 
Categories / Java Book / 008 Reflection
 

0446 Get annotation for this field

<T extends Annotation>T getAnnotation(Class<T> annotationClass) Returns this element's annotation. Annotation[] getDeclaredAnnotations() Returns all annotations that are directly present on this element