org.hibernate.validator.internal.engine.constraintvalidation
Class ConstraintValidatorManager

java.lang.Object
  extended by 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
ConstraintValidatorManager(javax.validation.ConstraintValidatorFactory constraintValidatorFactory)
          Creates a new ConstraintValidatorManager.
 
Method Summary
 void clear()
           
 javax.validation.ConstraintValidatorFactory getDefaultConstraintValidatorFactory()
           
<V,A extends Annotation>
javax.validation.ConstraintValidator<A,V>
getInitializedValidator(Type validatedValueType, javax.validation.metadata.ConstraintDescriptor<A> descriptor, javax.validation.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(javax.validation.ConstraintValidatorFactory constraintValidatorFactory)
Creates a new ConstraintValidatorManager.

Method Detail

getInitializedValidator

public <V,A extends Annotation> javax.validation.ConstraintValidator<A,V> getInitializedValidator(Type validatedValueType,
                                                                                                  javax.validation.metadata.ConstraintDescriptor<A> descriptor,
                                                                                                  javax.validation.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 javax.validation.ConstraintValidatorFactory getDefaultConstraintValidatorFactory()

numberOfCachedConstraintValidatorInstances

public int numberOfCachedConstraintValidatorInstances()


Copyright © 2012 Oracle Corporation. All Rights Reserved.