public interface ExecutableValidator
Modifier and Type | Method and Description |
---|---|
<T> Set<ConstraintViolation<T>> |
validateConstructorParameters(Constructor<? extends T> constructor,
Object[] parameterValues,
Class<?>... groups)
Validates all constraints placed on the parameters of the given constructor.
|
<T> Set<ConstraintViolation<T>> |
validateConstructorReturnValue(Constructor<? extends T> constructor,
T createdObject,
Class<?>... groups)
Validates all return value constraints of the given constructor.
|
<T> Set<ConstraintViolation<T>> |
validateParameters(T object,
Method method,
Object[] parameterValues,
Class<?>... groups)
Validates all constraints placed on the parameters of the given method.
|
<T> Set<ConstraintViolation<T>> |
validateReturnValue(T object,
Method method,
Object returnValue,
Class<?>... groups)
Validates all return value constraints of the given method.
|
<T> Set<ConstraintViolation<T>> validateParameters(T object, Method method, Object[] parameterValues, Class<?>... groups)
T
- the type hosting the method to validateobject
- the object on which the method to validate is invokedmethod
- the method for which the parameter constraints is validatedparameterValues
- the values provided by the caller for the given method's
parametersgroups
- the group or list of groups targeted for validation (defaults to
Default
)null
IllegalArgumentException
- if null
is passed for any of the parameters
or if parameters don't match with each otherValidationException
- if a non recoverable error happens during the
validation process<T> Set<ConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups)
T
- the type hosting the method to validateobject
- the object on which the method to validate is invokedmethod
- the method for which the return value constraints is validatedreturnValue
- the value returned by the given methodgroups
- the group or list of groups targeted for validation (defaults to
Default
)null
IllegalArgumentException
- if null
is passed for any of the object,
method or groups parameters or if parameters don't match with each otherValidationException
- if a non recoverable error happens during the
validation process<T> Set<ConstraintViolation<T>> validateConstructorParameters(Constructor<? extends T> constructor, Object[] parameterValues, Class<?>... groups)
T
- the type hosting the constructor to validateconstructor
- the constructor for which the parameter constraints is validatedparameterValues
- the values provided by the caller for the given constructor's
parametersgroups
- the group or list of groups targeted for validation (defaults to
Default
)null
IllegalArgumentException
- if null
is passed for any of the parameters
or if parameters don't match with each otherValidationException
- if a non recoverable error happens during the
validation process<T> Set<ConstraintViolation<T>> validateConstructorReturnValue(Constructor<? extends T> constructor, T createdObject, Class<?>... groups)
T
- the type hosting the constructor to validateconstructor
- the constructor for which the return value constraints is validatedcreatedObject
- the object instantiated by the given methodgroups
- the group or list of groups targeted for validation (defaults to
Default
)null
IllegalArgumentException
- if null
is passed for any of the parameters
or if parameters don't match with each otherValidationException
- if a non recoverable error happens during the
validation processComments to: bean-validation-dev@eclipse.org.
Copyright © 2019,2020 Eclipse Foundation.
Use is subject to EFSL; this spec is based on material that is licensed under the Apache License, version 2.0.