public class MappedConstraintValidatorFactory
extends java.lang.Object
implements javax.validation.ConstraintValidatorFactory
| Constructor and Description |
|---|
MappedConstraintValidatorFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends javax.validation.ConstraintValidator<?,?>> |
addConstraintValidator(java.lang.Class<T> key,
java.util.function.Supplier<T> constraintValidator)
Adds validator as a non-singleton.
|
<T extends javax.validation.ConstraintValidator<?,?>> |
addConstraintValidator(java.lang.Class<T> key,
T constraintValidator)
Adds validator as a singleton.
|
<T extends javax.validation.ConstraintValidator<?,?>> |
getInstance(java.lang.Class<T> key) |
void |
releaseInstance(javax.validation.ConstraintValidator<?,?> instance) |
public <T extends javax.validation.ConstraintValidator<?,?>> MappedConstraintValidatorFactory addConstraintValidator(java.lang.Class<T> key, T constraintValidator)
T - the type of constraint validator implementationkey - the constraint validator typeconstraintValidator - the constraint validator instanceMappedConstraintValidatorFactory with the given constraint validator added.public <T extends javax.validation.ConstraintValidator<?,?>> MappedConstraintValidatorFactory addConstraintValidator(java.lang.Class<T> key, java.util.function.Supplier<T> constraintValidator)
T - the type of constraint validator implementationkey - the constraint validator typeconstraintValidator - the constraint validator instanceMappedConstraintValidatorFactory with the given constraint validator added.public <T extends javax.validation.ConstraintValidator<?,?>> T getInstance(java.lang.Class<T> key)
getInstance in interface javax.validation.ConstraintValidatorFactorypublic void releaseInstance(javax.validation.ConstraintValidator<?,?> instance)
releaseInstance in interface javax.validation.ConstraintValidatorFactory