public interface ConstraintValidator<A extends Annotation,T>
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(A constraintAnnotation)
Initialize the validator in preparation for isValid calls.
|
boolean |
isValid(T value,
ConstraintValidatorContext context)
Implement the validation logic.
|
void initialize(A constraintAnnotation)
constraintAnnotation - annotation instance for a given constraint declarationboolean isValid(T value, ConstraintValidatorContext context)
value must not be altered.
This method can be accessed concurrently, thread-safety must be ensured
by the implementation.value - object to validatecontext - context in which the constraint is evaluatedvalue does not pass the constraintCopyright © 2012 JBoss by Red Hat. All Rights Reserved.