org.hibernate.validator.internal.cdi

## Class InjectingConstraintValidatorFactory

- java.lang.Object
- - org.hibernate.validator.internal.cdi.InjectingConstraintValidatorFactory

- All Implemented Interfaces:
    ConstraintValidatorFactory

      public class InjectingConstraintValidatorFactory
      extends Object
      implements ConstraintValidatorFactory

  A `ConstraintValidatorFactory` which enables CDI based dependency injection for the created `ConstraintValidator`s.
  Author:
    Gunnar Morling, Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InjectingConstraintValidatorFactory(BeanManager beanManager)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends ConstraintValidator<?,?>> T` | `getInstance(Class<T> key)`
    `void` | `releaseInstance(ConstraintValidator<?,?> instance)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InjectingConstraintValidatorFactory

          @Inject
          public InjectingConstraintValidatorFactory(BeanManager beanManager)

  - ### Method Detail

    - #### getInstance

          public <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)

      Specified by:
        `getInstance` in interface `ConstraintValidatorFactory`

    - #### releaseInstance

          public void releaseInstance(ConstraintValidator<?,?> instance)

      Specified by:
        `releaseInstance` in interface `ConstraintValidatorFactory`

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved