public static boolean hasAnnotationOfType(Element element, Class<? extends Annotation> annotation) {
        return element.getAnnotation(annotation) != null;
    }
Various utility classes for {@link Element} and {@link AnnotationMirror} handling

@author tiwe
querydsl-apt/src/main/java/com/querydsl/apt/TypeUtils.java