Examples of SupportedValidationTarget


Examples of javax.validation.constraintvalidation.SupportedValidationTarget

    return matchingValidatorClasses;
  }

  private boolean supportsValidationTarget(Class<? extends ConstraintValidator<?, ?>> validatorClass, ValidationTarget target) {
    SupportedValidationTarget supportedTargetAnnotation = validatorClass.getAnnotation(
        SupportedValidationTarget.class
    );

    //by default constraints target the annotated element
    if ( supportedTargetAnnotation == null ) {
      return target == ValidationTarget.ANNOTATED_ELEMENT;
    }

    return Arrays.asList( supportedTargetAnnotation.value() ).contains( target );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.