Mega Code Archive

 
Categories / Java Book / 008 Reflection
 

0450 Method Reflection

A Method provides information about a method on a class or interface. Get annotations <T extends Annotation>T getAnnotation(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null. Annotation[] getDeclaredAnnotations() Returns all annotations that are directly present on this element.