public interface MethodValidator
| Modifier and Type | Method and Description |
|---|---|
<T> Set<ConstraintViolation<T>> |
validateConstructorParameters(Constructor<T> constructor,
Object[] parameterValues,
Class<?>... groups)
Validates all constraints placed on the parameters of the given constructor.
|
<T> Set<ConstraintViolation<T>> |
validateConstructorReturnValue(Constructor<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 validate.object - The object on which the method to validate was invoked.method - The method for which the parameter constraints shall be validated.parameterValues - The values provided by the caller for the given method's
parameters.groups - The group or list of groups targeted for validation (defaults to
Default).null.ValidationException - 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 validate.object - The object on which the method to validate was invoked.method - The method for which the return value constraints shall be validated.returnValue - The value returned by the given method.groups - The group or list of groups targeted for validation (defaults to
Default).null.ValidationException - if a non recoverable error happens during the
validation process<T> Set<ConstraintViolation<T>> validateConstructorParameters(Constructor<T> constructor, Object[] parameterValues, Class<?>... groups)
T - The type hosting the constructor to validate.constructor - The constructor for which the parameter constraints shall be validated.parameterValues - The values provided by the caller for the given constructor's
parameters.groups - The group or list of groups targeted for validation (defaults to
Default).null.ValidationException - if a non recoverable error happens during the
validation process<T> Set<ConstraintViolation<T>> validateConstructorReturnValue(Constructor<T> constructor, T createdObject, Class<?>... groups)
T - The type hosting the constructor to validate.constructor - The constructor for which the return value constraints shall be validated.createdObject - The object instantiated by the given method.groups - The group or list of groups targeted for validation (defaults to
Default).null.ValidationException - if a non recoverable error happens during the
validation processCopyright © 2013. All Rights Reserved.