public class ValidatorConstraintResolver extends java.lang.Object implements ConstraintResolver
ConstraintResolver that uses a Bean Validation Validator to resolve
constraints. The name of the constraint is the fully-qualified class name of the
constraint annotation. For example, a NotNull constraint will be named
javax.validation.constraints.NotNull.| Constructor and Description |
|---|
ValidatorConstraintResolver()
Creates a new
ValidatorConstraintResolver that will use a Validator
in its default configuration to resolve constraints. |
ValidatorConstraintResolver(Validator validator)
Creates a new
ValidatorConstraintResolver that will use the given
Validator to resolve constraints. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Constraint> |
resolveForProperty(java.lang.String property,
java.lang.Class<?> clazz)
Resolves and returns the constraints for the given
property on the given
clazz. |
public ValidatorConstraintResolver()
ValidatorConstraintResolver that will use a Validator
in its default configuration to resolve constraints.public ValidatorConstraintResolver(Validator validator)
ValidatorConstraintResolver that will use the given
Validator to resolve constraints.validator - the validatorpublic java.util.List<Constraint> resolveForProperty(java.lang.String property, java.lang.Class<?> clazz)
ConstraintResolverproperty on the given
clazz. If there are no constraints, an empty list is returned.resolveForProperty in interface ConstraintResolverproperty - the propertyclazz - the classnull