org.hibernate.validator.internal.metadata.aggregated

## Class PropertyMetaData.Builder

- java.lang.Object
- - org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder
  - - org.hibernate.validator.internal.metadata.aggregated.PropertyMetaData.Builder

- Enclosing class:
    PropertyMetaData

      public static class PropertyMetaData.Builder
      extends MetaDataBuilder

- - ### Field Summary

    - ### Fields inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder

      `constraintHelper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyMetaData.Builder(Class<?> beanClass, ConstrainedExecutable constrainedMethod, ConstraintHelper constraintHelper)`
    `PropertyMetaData.Builder(Class<?> beanClass, ConstrainedField constrainedField, ConstraintHelper constraintHelper)`
    `PropertyMetaData.Builder(Class<?> beanClass, ConstrainedType constrainedType, ConstraintHelper constraintHelper)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accepts(ConstrainedElement constrainedElement)` Whether this builder allows to add the given element or not.
    `void` | `add(ConstrainedElement constrainedElement)` Adds the given element to this builder.
    `PropertyMetaData` | `build()` Creates a new, read-only `ConstraintMetaData` object with all constraint information related to the method or property represented by this builder.

    - ### Methods inherited from class org.hibernate.validator.internal.metadata.aggregated.MetaDataBuilder

      `adaptOriginsAndImplicitGroups, getConstraints, getGroupConversions, isCascading, requiresUnwrapping`

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

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

- - ### Constructor Detail

    - #### PropertyMetaData.Builder

          public PropertyMetaData.Builder(Class<?> beanClass,
                                  ConstrainedField constrainedField,
                                  ConstraintHelper constraintHelper)

    - #### PropertyMetaData.Builder

          public PropertyMetaData.Builder(Class<?> beanClass,
                                  ConstrainedType constrainedType,
                                  ConstraintHelper constraintHelper)

    - #### PropertyMetaData.Builder

          public PropertyMetaData.Builder(Class<?> beanClass,
                                  ConstrainedExecutable constrainedMethod,
                                  ConstraintHelper constraintHelper)

  - ### Method Detail

    - #### accepts

          public boolean accepts(ConstrainedElement constrainedElement)

      Description copied from class: `MetaDataBuilder`
      Whether this builder allows to add the given element or not. This is the case if the specified element relates to the same property or method with which this builder was instantiated.
      Specified by:
        `accepts` in class `MetaDataBuilder`
      Parameters:
        `constrainedElement` - The element to check.
      Returns:
        `true` if the given element can be added to this builder, `false` otherwise.

    - #### add

          public void add(ConstrainedElement constrainedElement)

      Description copied from class: `MetaDataBuilder`
      Adds the given element to this builder. It must be checked with `MetaDataBuilder.accepts(ConstrainedElement)` before, whether this is allowed or not.
      Overrides:
        `add` in class `MetaDataBuilder`
      Parameters:
        `constrainedElement` - The element to add.

    - #### build

          public PropertyMetaData build()

      Description copied from class: `MetaDataBuilder`
      Creates a new, read-only `ConstraintMetaData` object with all constraint information related to the method or property represented by this builder.
      Specified by:
        `build` in class `MetaDataBuilder`
      Returns:
        A `ConstraintMetaData` object.

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