private AnnotationMirror getAnnotation()

in src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java [209:219]


    private AnnotationMirror getAnnotation(javax.lang.model.element.Element element, String annotationName) {
        TypeElement annotation = processingEnv.getElementUtils().getTypeElement(annotationName);
        if (element != null && element.getAnnotationMirrors() != null) {
            for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
                if (mirror.getAnnotationType().asElement().equals(annotation)) {
                    return mirror;
                }
            }
        }
        return null;
    }