org.hibernate.validator.ap.checks
Class ConstraintCheckFactory

java.lang.Object
  extended by org.hibernate.validator.ap.checks.ConstraintCheckFactory

public class ConstraintCheckFactory
extends Object

A factory in charge of determining the ConstraintChecks required for the validation of annotations at given elements.

Author:
Gunnar Morling

Constructor Summary
ConstraintCheckFactory(ConstraintHelper constraintHelper)
           
 
Method Summary
 ConstraintChecks getConstraintChecks(javax.lang.model.element.Element annotatedElement, javax.lang.model.element.AnnotationMirror annotation)
          Returns those checks that have to be performed to validate the given annotation at the given element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintCheckFactory

public ConstraintCheckFactory(ConstraintHelper constraintHelper)
Method Detail

getConstraintChecks

public ConstraintChecks getConstraintChecks(javax.lang.model.element.Element annotatedElement,
                                            javax.lang.model.element.AnnotationMirror annotation)
Returns those checks that have to be performed to validate the given annotation at the given element. In case no checks have to be performed (e.g. because the given annotation is no constraint annotation) an empty ConstraintChecks instance will be returned. It's therefore always safe to operate on the returned object.

Parameters:
annotatedElement - An annotated element, e.g. a type declaration or a method.
annotation - An annotation.
Returns:
The checks to be performed to validate the given annotation at the given element.


Copyright © 2007-2010. All Rights Reserved.