public class MappedConstraintValidatorFactory extends Object implements javax.validation.ConstraintValidatorFactory
Constructor and Description |
---|
MappedConstraintValidatorFactory() |
Modifier and Type | Method and Description |
---|---|
<T extends javax.validation.ConstraintValidator<?,?>> |
addConstraintValidator(Class<T> key,
Supplier<T> constraintValidator)
Adds validator as a non-singleton.
|
<T extends javax.validation.ConstraintValidator<?,?>> |
addConstraintValidator(Class<T> key,
T constraintValidator)
Adds validator as a singleton.
|
<T extends javax.validation.ConstraintValidator<?,?>> |
getInstance(Class<T> key) |
void |
releaseInstance(javax.validation.ConstraintValidator<?,?> instance) |
public <T extends javax.validation.ConstraintValidator<?,?>> MappedConstraintValidatorFactory addConstraintValidator(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(Class<T> key, 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(Class<T> key)
getInstance
in interface javax.validation.ConstraintValidatorFactory
public void releaseInstance(javax.validation.ConstraintValidator<?,?> instance)
releaseInstance
in interface javax.validation.ConstraintValidatorFactory