Examples of validateParameters()


Examples of javax.validation.executable.ExecutableValidator.validateParameters()

        .buildValidatorFactory()
        .getValidator()
        .forExecutables();

    Object[] parameterValues = new Object[] { Collections.emptyMap() };
    Set<ConstraintViolation<User>> constraintViolations = executableValidator.validateParameters(
        new User(),
        User.class.getMethod( "setAddresses", Map.class ),
        parameterValues
    );
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

        List.class
    );
    Object[] parameterValues = new Object[] { null, null, null };

    //when
    Set<ConstraintViolation<Object>> constraintViolations = executableValidator.validateParameters(
        object,
        method,
        parameterValues
    );
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

    Object[] parameterValues = new Object[] { null };

    ExecutableValidator validator = TestUtil.getValidatorUnderTest().forExecutables();

    //when
    Set<ConstraintViolation<Object>> violations = validator.validateParameters(
        object,
        method,
        parameterValues
    );
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

    Object gentleman = new Gentleman();
    Method method = Gentleman.class.getMethod( "wearSuit", Suit.class );
    Object[] parameterValues = new Object[] { suit };

    executableValidator.validateParameters(
        gentleman,
        method,
        parameterValues
    );
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

    ExecutableValidator executableValidator = TestUtil.getValidatorFactoryUnderTest()
        .usingContext()
        .parameterNameProvider( new CustomParameterNameProvider() )
        .getValidator()
        .forExecutables();
    Set<ConstraintViolation<Object>> constraintViolations = executableValidator.validateParameters(
        object,
        method,
        parameters
    );
    assertCorrectNumberOfViolations( constraintViolations, 2 );
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

    }
   
    public< T > void validateParameters(final T instance, final Method method, final Object[] arguments) {
       
        final ExecutableValidator methodValidator = getExecutableValidator();
        final Set< ConstraintViolation< T > > violations = methodValidator.validateParameters(instance,
            method, arguments);
       
        if (!violations.isEmpty()) {
            throw new ConstraintViolationException(violations);
        }               
View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

   * in case at least one constraint violation occurred either during parameter or return value validation.
   */
  @AroundInvoke
  public Object validateMethodInvocation(InvocationContext ctx) throws Exception {
    ExecutableValidator executableValidator = validator.forExecutables();
    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        ctx.getTarget(),
        ctx.getMethod(),
        ctx.getParameters()
    );

View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

   * in case at least one constraint violation occurred either during parameter or return value validation.
   */
  @AroundInvoke
  public Object validateMethodInvocation(InvocationContext ctx) throws Exception {
    ExecutableValidator executableValidator = validator.forExecutables();
    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        ctx.getTarget(),
        ctx.getMethod(),
        ctx.getParameters()
    );

View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

   * in case at least one constraint violation occurred either during parameter or return value validation.
   */
  @AroundInvoke
  public Object validateMethodInvocation(InvocationContext ctx) throws Exception {
    ExecutableValidator executableValidator = validator.forExecutables();
    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        ctx.getTarget(),
        ctx.getMethod(),
        ctx.getParameters()
    );

View Full Code Here

Examples of javax.validation.executable.ExecutableValidator.validateParameters()

   * in case at least one constraint violation occurred either during parameter or return value validation.
   */
  @AroundInvoke
  public Object validateMethodInvocation(InvocationContext ctx) throws Exception {
    ExecutableValidator executableValidator = validator.forExecutables();
    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        ctx.getTarget(),
        ctx.getMethod(),
        ctx.getParameters()
    );

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.