Validate.notEmpty(annotationClass, "The annotation class cannot be null or"
+ " empty.");
Validate.notNull(classLoader, "The class loader cannot be null.");
try {
ClassResource klass = new ClassResource(className, classLoader);
return klass.isAnnotationPresent(annotationClass);
} catch (IOException ex) {
throw new ClassNotFoundException("The class " + className + " is not"
+ " found in the current classpath.", ex);
}
}