Package javax.validation.constraintvalidation

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

Related Classes of javax.validation.constraintvalidation.SupportedValidationTarget

Copyright © 2018 www.massapicom. 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.