public interface ConstraintValidator<A extends Annotation,T>
Description: Abstract constraint's validator of all kinds of validators.
Defines the logic to validate a given constraint 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 can be put on a
ConstraintValidator implementation to mark it as supporting
cross-parameter constraints. Check out
and Constraint for more information.
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
validate(T value,
A constraintAnnotation)
main method that invoke by
Validator
in ValidatorContext to validate parameter
under the A annotation. |
boolean validate(T value, A constraintAnnotation)
Validator
in ValidatorContext to validate parameter
under the A annotation.value - parameter valueconstraintAnnotation - parameter annotationCopyright © 2020. All rights reserved.