A
- the Constraint
annotation this interface validates.public interface ConstraintValidator<A extends java.lang.annotation.Annotation>
Constraint
annotations must implement to perform validation logic.Modifier and Type | Method and Description |
---|---|
void |
initialize(A annotation)
Called before this validator is used with the constraint annotation value.
|
boolean |
isValid(java.lang.String name,
java.lang.Object value)
Indicates if the given value is valid.
|
void initialize(A annotation)
annotation
- the annotation value this validator will be validating.boolean isValid(java.lang.String name, java.lang.Object value)
name
- the name to use for error reportingvalue
- the value to validate.true
if the given value is valid.