private List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>
     findConstraintValidatorClasses(Class<? extends Annotation> annotationType) {
   List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>
       constraintValidatorDefinitionClasses = newArrayList();
   if (constraintHelper.isBuiltinConstraint(annotationType)) {
     constraintValidatorDefinitionClasses.addAll(
         constraintHelper.getBuiltInConstraints(annotationType));
   } else {
     Class<? extends ConstraintValidator<?, ?>>[] validatedBy =
         annotationType.getAnnotation(Constraint.class).validatedBy();
     constraintValidatorDefinitionClasses.addAll(Arrays.asList(validatedBy));
   }
   return constraintValidatorDefinitionClasses;
 }
  @SuppressWarnings("unchecked")
  private void parseConstraintDefinitions(
      List<ConstraintDefinitionType> constraintDefinitionList, String defaultPackage) {
    for (ConstraintDefinitionType constraintDefinition : constraintDefinitionList) {
      String annotationClassName = constraintDefinition.getAnnotation();

      Class<?> clazz = getClass(annotationClassName, defaultPackage);
      if (!clazz.isAnnotation()) {
        throw log.getIsNotAnAnnotationException(annotationClassName);
      }
      Class<? extends Annotation> annotationClass = (Class<? extends Annotation>) clazz;

      ValidatedByType validatedByType = constraintDefinition.getValidatedBy();
      List<Class<? extends ConstraintValidator<? extends Annotation, ?>>>
          constraintValidatorClasses = newArrayList();
      if (validatedByType.getIncludeExistingValidators() != null
          && validatedByType.getIncludeExistingValidators()) {
        constraintValidatorClasses.addAll(findConstraintValidatorClasses(annotationClass));
      }
      for (String validatorClassName : validatedByType.getValue()) {
        Class<? extends ConstraintValidator<?, ?>> validatorClass;
        validatorClass =
            (Class<? extends ConstraintValidator<?, ?>>)
                ReflectionHelper.loadClass(validatorClassName, this.getClass());

        if (!ConstraintValidator.class.isAssignableFrom(validatorClass)) {
          throw log.getIsNotAConstraintValidatorClassException(validatorClass);
        }

        constraintValidatorClasses.add(validatorClass);
      }
      constraintHelper.addConstraintValidatorDefinition(
          annotationClass, constraintValidatorClasses);
    }
  }