Interface ConstraintValidatorProvider


@Contract public interface ConstraintValidatorProvider
A provider used to create validators for elements annotated with some Validation.Constraint annotation.

The provider must be named with the supported annotation fully qualified type name. Service registry is then used to discover an instance to handle the validation. All built-in validators have lower than default Weight.

  • Method Summary

    Modifier and Type
    Method
    Description
    create(TypeName typeName, Annotation constraintAnnotation)
    Create a validator for the given annotation and type.
  • Method Details

    • create

      ConstraintValidator create(TypeName typeName, Annotation constraintAnnotation)
      Create a validator for the given annotation and type.
      Parameters:
      typeName - type of the annotated element
      constraintAnnotation - constraint annotation of the annotated element
      Returns:
      validator to validate instances of the annotated element