Java examples for java.lang.annotation:Annotation Element
is Annotation Present for Annotated Element
//package com.java2s; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; public class Main { public static boolean isAnnotationPresent(AnnotatedElement element, Class<? extends Annotation> annotation) { return element.isAnnotationPresent(annotation); }//from w w w.j a v a2 s . c o m }