Interface ConstraintValidatorDescriptor<A extends Annotation>
-
public interface ConstraintValidatorDescriptor<A extends Annotation>Represents a specific validator (either based on an implementation ofConstraintValidatoror given as a Lambda expression/method reference.- Author:
- Gunnar Morling
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <A extends Annotation>
ConstraintValidatorDescriptor<A>forBuiltinClass(Class<? extends ConstraintValidator<A,?>> validatorClass, Class<? extends Annotation> constraintAnnotationType)static <A extends Annotation>
ConstraintValidatorDescriptor<A>forClass(Class<? extends ConstraintValidator<A,?>> validatorClass, Class<? extends Annotation> constraintAnnotationType)static <A extends Annotation,T>
ConstraintValidatorDescriptor<A>forLambda(Class<A> annotationType, Type validatedType, ConstraintDefinitionContext.ValidationCallable<T> lambda)TypegetValidatedType()The data type validated by the represented validator (not the constraint annotation type).EnumSet<ValidationTarget>getValidationTargets()The targets supported for validation by the represented validator.Class<? extends ConstraintValidator<A,?>>getValidatorClass()The implementation type of the represented validator.ConstraintValidator<A,?>newInstance(ConstraintValidatorFactory constraintValidatorFactory)Creates a new instance of the represented implementation type.
-
-
-
Method Detail
-
getValidatorClass
Class<? extends ConstraintValidator<A,?>> getValidatorClass()
The implementation type of the represented validator.
-
getValidationTargets
EnumSet<ValidationTarget> getValidationTargets()
The targets supported for validation by the represented validator.
-
getValidatedType
Type getValidatedType()
The data type validated by the represented validator (not the constraint annotation type).
-
newInstance
ConstraintValidator<A,?> newInstance(ConstraintValidatorFactory constraintValidatorFactory)
Creates a new instance of the represented implementation type.
-
forClass
static <A extends Annotation> ConstraintValidatorDescriptor<A> forClass(Class<? extends ConstraintValidator<A,?>> validatorClass, Class<? extends Annotation> constraintAnnotationType)
-
forBuiltinClass
static <A extends Annotation> ConstraintValidatorDescriptor<A> forBuiltinClass(Class<? extends ConstraintValidator<A,?>> validatorClass, Class<? extends Annotation> constraintAnnotationType)
-
forLambda
static <A extends Annotation,T> ConstraintValidatorDescriptor<A> forLambda(Class<A> annotationType, Type validatedType, ConstraintDefinitionContext.ValidationCallable<T> lambda)
-
-