A
for a given object type T.
Implementations must comply to the following restriction:
T must resolve to a non parameterized typeT must be unbounded
wildcard types
The annotation SupportedValidationTarget can be put on a
ConstraintValidator implementation to mark it as supporting
cross-parameter constraints. Check out SupportedValidationTarget
and Constraint for more information.
| Modifier and Type | Method and Description |
|---|---|
| public default void | initialize(A
annotation instance for a given constraint declaration constraintAnnotation)Initializes the validator in preparation for
|
| public boolean | Returns: false if value does not pass the constraintobject to validate value, ConstraintValidatorContext context in which the constraint is evaluated context)Implements the validation logic. |
| initialize | back to summary |
|---|---|
| public default void initialize(A constraintAnnotation) Initializes the validator in preparation for
This method is guaranteed to be called before any use of this instance for validation. The default implementation is a no-op.
| |
| isValid | back to summary |
|---|---|
| public boolean isValid(T value, ConstraintValidatorContext context) Implements the validation logic.
The state of This method can be accessed concurrently, thread-safety must be ensured by the implementation.
| |