public interface ConstraintValidatorFactory
ConstraintValidator
instance based off its class.
The ConstraintValidatorFactory
is not responsible
for calling ConstraintValidator.initialize(java.lang.annotation.Annotation)
.Modifier and Type | Method and Description |
---|---|
<T extends ConstraintValidator<?,?>> |
getInstance(Class<T> key) |
void |
releaseInstance(ConstraintValidator<?,?> instance)
Signals
ConstraintValidatorFactory that the instance is no longer
being used by the Jakarta Bean Validation provider. |
<T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)
T
- The type of the constraint validator to instantiatekey
- The class of the constraint validator to instantiatevoid releaseInstance(ConstraintValidator<?,?> instance)
ConstraintValidatorFactory
that the instance is no longer
being used by the Jakarta Bean Validation provider.instance
- validator being releasedThis spec is licensed under the EFSL; this spec is based on material that is licensed under the Apache License, version 2.0.