Class DefaultConstraintValidatorFactory

  • All Implemented Interfaces:
    jakarta.validation.ConstraintValidatorFactory, Closeable, AutoCloseable

    public class DefaultConstraintValidatorFactory
    extends Object
    implements jakarta.validation.ConstraintValidatorFactory, Closeable
    Description: create constraint instances with the default / no-arg constructor
    • Constructor Detail

      • DefaultConstraintValidatorFactory

        public DefaultConstraintValidatorFactory()
    • Method Detail

      • getInstance

        public <T extends jakarta.validation.ConstraintValidator<?,​?>> T getInstance​(Class<T> constraintClass)
        Instantiate a Constraint.
        Specified by:
        getInstance in interface jakarta.validation.ConstraintValidatorFactory
        Returns:
        Returns a new Constraint instance The ConstraintFactory is not responsible for calling Constraint#initialize
      • releaseInstance

        public void releaseInstance​(jakarta.validation.ConstraintValidator<?,​?> instance)
        Specified by:
        releaseInstance in interface jakarta.validation.ConstraintValidatorFactory