if ( !annotationClass.isAnnotation() ) {
throw new ValidationException( annotationClassName + " is not an annotation" );
}
ValidatedByType validatedByType = constraintDefinition.getValidatedBy();
List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
if ( validatedByType.isIncludeExistingValidators() != null && validatedByType.isIncludeExistingValidators() ) {
constraintValidatorClasses.addAll( findConstraintValidatorClasses( annotationClass ) );
}
for ( JAXBElement<String> validatorClassName : validatedByType.getValue() ) {
Class<? extends ConstraintValidator<?, ?>> validatorClass;
try {
validatorClass = ( Class<? extends ConstraintValidator<?, ?>> ) ReflectionHelper.classForName(
validatorClassName.getValue(),
this.getClass()