Here you can find the source of getAnnotation(AnnotatedElement element, Class extends Annotation> annotation)
public static Annotation getAnnotation(AnnotatedElement element, Class<? extends Annotation> annotation)
//package com.java2s; //License from project: Open Source License import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; public class Main { public static Annotation getAnnotation(AnnotatedElement element, Class<? extends Annotation> annotation) { return element.getAnnotation(annotation); }//from www. ja v a 2 s . com }