private boolean hasAnnotation ( Class c , Class targetClass , AnnotationRepository annotationRepository ) { Collection < Annotation > values = annotationRepository . getAnnotation ( targetClass ) ; if ( values == null ) return false ; for ( Annotation annotation : values ) { if ( annotation . getClassName ( ) != null && annotation . getClassName ( ) . equals ( c . getName ( ) ) ) return true ; } return false ; }
hasAnnotation if class c contains annotation targetClass