Class DefaultInternalConstraintValidatorFactory

java.lang.Object
io.micronaut.validation.validator.constraints.DefaultInternalConstraintValidatorFactory
All Implemented Interfaces:
InternalConstraintValidatorFactory, jakarta.validation.ConstraintValidatorFactory

@Bean(typed=InternalConstraintValidatorFactory.class) @Singleton @Internal public class DefaultInternalConstraintValidatorFactory extends Object implements InternalConstraintValidatorFactory
The default implementation of InternalConstraintValidatorFactory.
Since:
4.3.0
Author:
Denis Stepanov
  • Constructor Details

    • DefaultInternalConstraintValidatorFactory

      public DefaultInternalConstraintValidatorFactory(io.micronaut.core.beans.BeanIntrospector beanIntrospector, @Nullable @Nullable io.micronaut.context.BeanContext beanContext)
    • DefaultInternalConstraintValidatorFactory

      @Inject public DefaultInternalConstraintValidatorFactory(io.micronaut.context.BeanContext beanContext)
  • Method Details

    • getInstance

      public <T extends jakarta.validation.ConstraintValidator<?, ?>> T getInstance(Class<T> type)
      Specified by:
      getInstance in interface jakarta.validation.ConstraintValidatorFactory
    • releaseInstance

      public void releaseInstance(jakarta.validation.ConstraintValidator<?,?> constraintValidator)
      Specified by:
      releaseInstance in interface jakarta.validation.ConstraintValidatorFactory
    • getInstance

      public <T extends jakarta.validation.ConstraintValidator<?, ?>> T getInstance(Class<T> type, Class<?> targetType, jakarta.validation.ConstraintTarget constraintTarget)
      Description copied from interface: InternalConstraintValidatorFactory
      Find an instance ConstraintValidator.
      Specified by:
      getInstance in interface InternalConstraintValidatorFactory
      Type Parameters:
      T - The validator type
      Parameters:
      type - The validator type
      targetType - The target type
      constraintTarget - The constraint target
      Returns:
      a new instance or null if not supported