public class InjectingConstraintValidatorFactory extends Object implements ConstraintValidatorFactory
ConstraintValidatorFactory
which enables CDI based dependency injection for the created
ConstraintValidator
s.Constructor and Description |
---|
InjectingConstraintValidatorFactory(BeanManager beanManager) |
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 Bean Validation provider. |
@Inject public InjectingConstraintValidatorFactory(BeanManager beanManager)
public <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)
getInstance
in interface ConstraintValidatorFactory
key
- The class of the constraint validator to instantiatepublic void releaseInstance(ConstraintValidator<?,?> instance)
ConstraintValidatorFactory
ConstraintValidatorFactory
that the instance is no longer
being used by the Bean Validation provider.releaseInstance
in interface ConstraintValidatorFactory
instance
- validator being releasedCopyright © 2017 JBoss by Red Hat. All rights reserved.