Package: grails.validation

## [Java] Interface ConstraintsEvaluator

- Evaluates and returns constraints.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `java.lang.String` | `BEAN_NAME` |
    `java.lang.String` | `CONSTRAINTS_GROOVY_SCRIPT` |
    `java.lang.String` | `PROPERTY_NAME` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(java.lang.Class cls)` Evaluate constraints for the given class
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(java.lang.Class cls, boolean defaultNullable)` Evaluate constraints for the given class
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(java.lang.Class<?> cls, boolean defaultNullable, boolean useOnlyAdHocConstraints, groovy.lang.Closure... adHocConstraintsClosures)` Evaluate constraints for the given class
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(GrailsDomainClass cls)` Evaluate constraints for the given class
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(java.lang.Object object, GrailsDomainClassProperty[] properties)` Evaluate constraints for the given object and properties
    `` | `java.util.Map<java.lang.String, Constrained>` | `evaluate(java.lang.Class<?> cls, GrailsDomainClassProperty[] properties)` Evaluate constraints for the given Class and properties
    `` | `java.util.Map<java.lang.String, java.lang.Object>` | `getDefaultConstraints()` The default constraints to use

- - ### Field Detail

    - #### public java.lang.String BEAN_NAME

    - #### public java.lang.String CONSTRAINTS_GROOVY_SCRIPT

    - #### public java.lang.String PROPERTY_NAME

  - ### Method Detail

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(@java.lang.SuppressWarnings("rawtypes") java.lang.Class cls)

      Evaluate constraints for the given class

      Parameters:
        `cls` - The class to evaluate constraints for
      Returns:
        A map of constrained properties

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(@java.lang.SuppressWarnings("rawtypes") java.lang.Class cls, boolean defaultNullable)

      Evaluate constraints for the given class

      Parameters:
        `cls` - The class to evaluate constraints for
        `defaultNullable` - indicates if properties are nullable by default
      Returns:
        A map of constrained properties

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(java.lang.Class<?> cls, boolean defaultNullable, boolean useOnlyAdHocConstraints, groovy.lang.Closure... adHocConstraintsClosures)

      Evaluate constraints for the given class

      Parameters:
        `cls` - The class to evaluate constraints for
        `defaultNullable` - indicates if properties are nullable by default
        `useOnlyAdHocConstraints` - indicates if evaluating without pre-declared constraints
        `adHocConstraintsClosures` - ad-hoc constraints to evaluate for
      Returns:
        A map of constrained properties

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(GrailsDomainClass cls)

      Evaluate constraints for the given class

      Parameters:
        `cls` - The class to evaluate constraints for
      Returns:
        A map of constrained properties

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(java.lang.Object object, GrailsDomainClassProperty[] properties)

      Evaluate constraints for the given object and properties

      Parameters:
        `object` - The object
        `properties` - The domain class properties
      Returns:
        A map of constraints

    - #### public java.util.Map<java.lang.String, Constrained> evaluate(java.lang.Class<?> cls, GrailsDomainClassProperty[] properties)

      Evaluate constraints for the given Class and properties

      Parameters:
        `cls` - The object
        `properties` - The domain class properties
      Returns:
        A map of constraints

    - #### public java.util.Map<java.lang.String, java.lang.Object> getDefaultConstraints()

      The default constraints to use

      Returns:
        A map of default constraints