|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MethodValidator
Description: Appendix C. Proposal for method-level validation.
This interface contains the APIs added to javax.validation.Validator.
It can be removed as soon as the Validator interface contains these methods.
The extension is not a part of the JSR303 core specification yet, but could
be in a future revision.
You can access the extension via the use of the Validator.unwrap() method.
Method Summary | ||
---|---|---|
|
validateParameter(Class<T> clazz,
Constructor<T> constructor,
Object parameterValue,
int parameterIndex,
Class<?>... groups)
Validate the parameter value based on the constraints described on the parameterIndex-th parameter of constructor . |
|
|
validateParameter(Class<T> clazz,
Method method,
Object parameterValue,
int parameterIndex,
Class<?>... groups)
Validate the parameter value based on the constraints described on the parameterIndex-th parameter of method . |
|
|
validateParameters(Class<T> clazz,
Constructor<T> constructor,
Object[] parameterValues,
Class<?>... groups)
Validate each parameter value based on the constraints described on the parameters of constructor . |
|
|
validateParameters(Class<T> clazz,
Method method,
Object[] parameterValues,
Class<?>... groups)
Validate each parameter value based on the constraints described on the parameters of method . |
|
|
validateReturnedValue(Class<T> clazz,
Method method,
Object returnedValue,
Class<?>... groups)
Validate each parameter value based on the constraints described on method . |
Methods inherited from interface javax.validation.Validator |
---|
getConstraintsForClass, unwrap, validate, validateProperty, validateValue |
Method Detail |
---|
<T> Set<ConstraintViolation<T>> validateParameters(Class<T> clazz, Method method, Object[] parameterValues, Class<?>... groups)
method
.
clazz
- class hosting the methodmethod
- the method whose parameters are currectly validatedparameterValues
- the parameter values passed to the method for invocationgroups
- groups targeted for validation
IllegalArgumentException
- if the method does not belong to T
or if the Object[] does not match the method signature<T> Set<ConstraintViolation<T>> validateParameter(Class<T> clazz, Method method, Object parameterValue, int parameterIndex, Class<?>... groups)
method
.
clazz
- class hosting the methodmethod
- the method whose parameters are currectly validatedparameterValue
- the parameter value passed to the parameterIndex-t parameter of methodparameterIndex
- parameter index of the parameter validated in methodgroups
- groups targeted for validation
IllegalArgumentException
- if the method does not belong to T
or if parameterIndex is out of bound<T> Set<ConstraintViolation<T>> validateReturnedValue(Class<T> clazz, Method method, Object returnedValue, Class<?>... groups)
method
.
clazz
- class hosting the methodmethod
- the method whose result is validatedreturnedValue
- the value returned by the method invocationgroups
- groups targeted for validation
IllegalArgumentException
- if the method does not belong to T
<T> Set<ConstraintViolation<T>> validateParameters(Class<T> clazz, Constructor<T> constructor, Object[] parameterValues, Class<?>... groups)
constructor
.
clazz
- class hosting the constructorconstructor
- the constructor whose parameters are correctly validatedparameterValues
- the parameter values passed to the constructor for invocationgroups
- groups targeted for validation
IllegalArgumentException
- if the constructor does not belong to T
or if the Object[] does not match the constructor signature<T> Set<ConstraintViolation<T>> validateParameter(Class<T> clazz, Constructor<T> constructor, Object parameterValue, int parameterIndex, Class<?>... groups)
constructor
.
clazz
- class hosting the constructorconstructor
- the method whose parameters are correctly validatedparameterValue
- the parameter value passed to the
parameterIndex-th parameter of constructorparameterIndex
- parameter index of the parameter validated in constructorgroups
- groups targeted for validation
IllegalArgumentException
- if the constructor does not belong to T
or if prameterIndex is out of bound
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |