private boolean hasAnnotation ( JavaAnnotatedElement clazz , Class < ? extends Annotation > annotationClazz ) { return clazz . getAnnotations ( ) . stream ( ) . filter ( item -> item . getType ( ) . isA ( annotationClazz . getName ( ) ) ) . count ( ) > 0 ; }
Checks if the given element has an annotation set .