org.hibernate.validator.internal.cfg

## Class DefaultConstraintMapping

- java.lang.Object
- - org.hibernate.validator.internal.cfg.DefaultConstraintMapping

- All Implemented Interfaces:
    ConstraintMapping

      public class DefaultConstraintMapping
      extends Object
      implements ConstraintMapping

  Default implementation of `ConstraintMapping`.
  Author:
    Hardy Ferentschik, Gunnar Morling, Kevin Pollet (C) 2011 SERLI

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultConstraintMapping()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnnotationProcessingOptionsImpl` | `getAnnotationProcessingOptions()`
    `Set<BeanConfiguration<?>>` | `getBeanConfigurations(ConstraintHelper constraintHelper, ParameterNameProvider parameterNameProvider)` Returns all bean configurations configured through this constraint mapping.
    `Set<Class<?>>` | `getConfiguredTypes()`
    `<C> TypeConstraintMappingContext<C>` | `type(Class<C> type)` Starts defining constraints on the specified bean class.

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

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

- - ### Constructor Detail

    - #### DefaultConstraintMapping

          public DefaultConstraintMapping()

  - ### Method Detail

    - #### type

          public final <C> TypeConstraintMappingContext<C> type(Class<C> type)

      Description copied from interface: `ConstraintMapping`
      Starts defining constraints on the specified bean class. Each bean class may only be configured once within all constraint mappings used for configuring one validator factory.
      Specified by:
        `type` in interface `ConstraintMapping`
      Type Parameters:
        `C` - The type to be configured.
      Parameters:
        `type` - The bean class on which to define constraints. All constraints defined after calling this method are added to the bean of the type `beanClass` until the next call of `type`.
      Returns:
        Instance allowing for defining constraints on the specified class.

    - #### getAnnotationProcessingOptions

          public final AnnotationProcessingOptionsImpl getAnnotationProcessingOptions()

    - #### getConfiguredTypes

          public Set<Class<?>> getConfiguredTypes()

    - #### getBeanConfigurations

          public Set<BeanConfiguration<?>> getBeanConfigurations(ConstraintHelper constraintHelper,
                                                        ParameterNameProvider parameterNameProvider)

      Returns all bean configurations configured through this constraint mapping.
      Parameters:
        `constraintHelper` - constraint helper required for building constraint descriptors
        `parameterNameProvider` - parameter name provider required for building parameter elements
      Returns:
        a set of `BeanConfiguration`s with an element for each type configured through this mapping

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