Class[] allAnnotations= AnnotationHelper.getAllAnnotations();
for(Class annotation : allAnnotations) {
// Try on the methods
for(Method m : cls.getMethods()) {
IAnnotation ma= annotationFinder.findAnnotation(m, annotation);
if(null != ma) {
return true;
}
}
// Try on the class
IAnnotation a= annotationFinder.findAnnotation(cls, annotation);
if(null != a) {
return true;
}
// Try on the constructors
for(Constructor ctor : cls.getConstructors()) {
IAnnotation ca= annotationFinder.findAnnotation(ctor, annotation);
if(null != ca) {
return true;
}
}
}