public static Predicate < Annotation > annotationIsOfClass ( final Class < ? extends Annotation > annotationClass ) { return candidate -> candidate != null && candidate . annotationType ( ) . equals ( annotationClass ) ; }
Checks if the candidate annotation is of the specified annotation class .