public class SpringConstraintValidatorFactory extends Object implements ConstraintValidatorFactory
ConstraintValidatorFactory
implementation that delegates to a
Spring BeanFactory for creating autowired ConstraintValidator
instances.AutowireCapableBeanFactory.createBean(Class)
,
ApplicationContext.getAutowireCapableBeanFactory()
Constructor and Description |
---|
SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
Create a new SpringConstraintValidatorFactory for the given BeanFactory.
|
Modifier and Type | Method and Description |
---|---|
<T extends ConstraintValidator<?,?>> |
getInstance(Class<T> key) |
void |
releaseInstance(ConstraintValidator<?,?> instance) |
public SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)
getInstance
in interface ConstraintValidatorFactory
public void releaseInstance(ConstraintValidator<?,?> instance)