org.hibernate.validator.ap.checks

## Class ConstraintCheckFactory

- java.lang.Object
- - org.hibernate.validator.ap.checks.ConstraintCheckFactory

-     public class ConstraintCheckFactory
      extends Object

  A factory in charge of determining the `ConstraintCheck`s required for the validation of annotations at given elements.
  Author:
    Gunnar Morling

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintCheckFactory(Types typeUtils, ConstraintHelper constraintHelper, AnnotationApiHelper annotationApiHelper, boolean methodConstraintsSupported)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConstraintChecks` | `getConstraintChecks(Element annotatedElement, 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(Types typeUtils,
                                ConstraintHelper constraintHelper,
                                AnnotationApiHelper annotationApiHelper,
                                boolean methodConstraintsSupported)

  - ### Method Detail

    - #### getConstraintChecks

          public ConstraintChecks getConstraintChecks(Element annotatedElement,
                                             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-2014 Red Hat, Inc. All Rights Reserved