org.hibernate.validator.internal.engine.constraintvalidation

## Class ConstraintValidatorManager

- java.lang.Object
- - org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorManager

-     public class ConstraintValidatorManager
      extends Object

  Manager in charge of providing and caching initialized `ConstraintValidator` instances.
  Author:
    Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintValidatorManager(ConstraintValidatorFactory constraintValidatorFactory)` Creates a new `ConstraintValidatorManager`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `ConstraintValidatorFactory` | `getDefaultConstraintValidatorFactory()`
    `<V,A extends Annotation> ConstraintValidator<A,V>` | `getInitializedValidator(Type validatedValueType, ConstraintDescriptorImpl<A> descriptor, ConstraintValidatorFactory constraintFactory)`
    `int` | `numberOfCachedConstraintValidatorInstances()`

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

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

- - ### Constructor Detail

    - #### ConstraintValidatorManager

          public ConstraintValidatorManager(ConstraintValidatorFactory constraintValidatorFactory)

      Creates a new `ConstraintValidatorManager`.

  - ### Method Detail

    - #### getInitializedValidator

          public <V,A extends Annotation> ConstraintValidator<A,V> getInitializedValidator(Type validatedValueType,
                                                                                  ConstraintDescriptorImpl<A> descriptor,
                                                                                  ConstraintValidatorFactory constraintFactory)

      Parameters:
        `validatedValueType` - the type of the value to be validated. Cannot be `null`
        `descriptor` - the constraint descriptor for which to get an initalized constraint validator. Cannot be `null`
        `constraintFactory` - constraint factory used to instantiate the constraint validator. Cannot be `null`.
      Returns:
        A initialized constraint validator for the given type and annotation of the value to be validated.

    - #### clear

          public void clear()

    - #### getDefaultConstraintValidatorFactory

          public ConstraintValidatorFactory getDefaultConstraintValidatorFactory()

    - #### numberOfCachedConstraintValidatorInstances

          public int numberOfCachedConstraintValidatorInstances()

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