public class SpringConstraintValidatorFactory extends java.lang.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(java.lang.Class<T> key) |
public SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic <T extends ConstraintValidator<?,?>> T getInstance(java.lang.Class<T> key)
getInstance
in interface ConstraintValidatorFactory