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 Summary
ConstructorDescriptionDefaultInternalConstraintValidatorFactory
(io.micronaut.context.BeanContext beanContext) DefaultInternalConstraintValidatorFactory
(io.micronaut.core.beans.BeanIntrospector beanIntrospector, @Nullable io.micronaut.context.BeanContext beanContext) -
Method Summary
Modifier and TypeMethodDescription<T extends jakarta.validation.ConstraintValidator<?,
?>>
TgetInstance
(Class<T> type) <T extends jakarta.validation.ConstraintValidator<?,
?>>
TgetInstance
(Class<T> type, Class<?> targetType, jakarta.validation.ConstraintTarget constraintTarget) Find an instanceConstraintValidator
.void
releaseInstance
(jakarta.validation.ConstraintValidator<?, ?> constraintValidator)
-
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
- Specified by:
getInstance
in interfacejakarta.validation.ConstraintValidatorFactory
-
releaseInstance
public void releaseInstance(jakarta.validation.ConstraintValidator<?, ?> constraintValidator) - Specified by:
releaseInstance
in interfacejakarta.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 instanceConstraintValidator
.- Specified by:
getInstance
in interfaceInternalConstraintValidatorFactory
- Type Parameters:
T
- The validator type- Parameters:
type
- The validator typetargetType
- The target typeconstraintTarget
- The constraint target- Returns:
- a new instance or null if not supported
-