org.hibernate.validator.internal.metadata.aggregated

## Class ReturnValueMetaData

- java.lang.Object
- - org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
  - - org.hibernate.validator.internal.metadata.aggregated.ReturnValueMetaData

- All Implemented Interfaces:
    Iterable<MetaConstraint<?>>, ConstraintMetaData, Cascadable, Validatable

      public class ReturnValueMetaData
      extends AbstractConstraintMetaData
      implements Validatable, Cascadable

  Represents the constraint related meta data of the return value of a method or constructor.
  Author:
    Gunnar Morling

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReturnValueMetaData(Type type, Set<MetaConstraint<?>> constraints, boolean isCascading, Map<Class<?>,Class<?>> groupConversions, boolean requiresUnwrapping)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ReturnValueDescriptor` | `asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)` Returns this meta data object's corresponding representation in the descriptor model.
    `Class<?>` | `convertGroup(Class<?> originalGroup)` Converts the given validation group as per the group conversion configuration for this element (as e.g.
    `Iterable<Cascadable>` | `getCascadables()` Returns the cascaded elements of this validatable, e.g.
    `ElementType` | `getElementType()`
    `Set<GroupConversionDescriptor>` | `getGroupConversionDescriptors()` Returns a set with `GroupConversionDescriptor`s representing the group conversions of this cascadable.
    `Object` | `getValue(Object parent)` Retrieves the value of this element from the given object.

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

      `asDescriptors, equals, getConstraints, getKind, getName, getType, hashCode, isCascading, isConstrained, iterator, requiresUnwrapping, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.hibernate.validator.internal.metadata.facets.Cascadable

      `getKind, getName`

- - ### Constructor Detail

    - #### ReturnValueMetaData

          public ReturnValueMetaData(Type type,
                             Set<MetaConstraint<?>> constraints,
                             boolean isCascading,
                             Map<Class<?>,Class<?>> groupConversions,
                             boolean requiresUnwrapping)

  - ### Method Detail

    - #### getCascadables

          public Iterable<Cascadable> getCascadables()

      Description copied from interface: `Validatable`
      Returns the cascaded elements of this validatable, e.g. the properties of a bean or the parameters of a method annotated with `@Valid`.
      Specified by:
        `getCascadables` in interface `Validatable`
      Returns:
        The cascaded elements of this validatable.

    - #### convertGroup

          public Class<?> convertGroup(Class<?> originalGroup)

      Description copied from interface: `Cascadable`
      Converts the given validation group as per the group conversion configuration for this element (as e.g. specified via `@ConvertGroup`.
      Specified by:
        `convertGroup` in interface `Cascadable`
      Parameters:
        `originalGroup` - The group to convert.
      Returns:
        The converted group. Will be the original group itself in case no conversion is to be performed.

    - #### getGroupConversionDescriptors

          public Set<GroupConversionDescriptor> getGroupConversionDescriptors()

      Description copied from interface: `Cascadable`
      Returns a set with `GroupConversionDescriptor`s representing the group conversions of this cascadable.
      Specified by:
        `getGroupConversionDescriptors` in interface `Cascadable`
      Returns:
        A set with group conversion descriptors. May be empty, but never `null`.

    - #### getElementType

          public ElementType getElementType()

      Specified by:
        `getElementType` in interface `Cascadable`

    - #### getValue

          public Object getValue(Object parent)

      Description copied from interface: `Cascadable`
      Retrieves the value of this element from the given object.
      Specified by:
        `getValue` in interface `Cascadable`
      Parameters:
        `parent` - The object to retrieve the value from.
      Returns:
        This element's value.

    - #### asDescriptor

          public ReturnValueDescriptor asDescriptor(boolean defaultGroupSequenceRedefined,
                                           List<Class<?>> defaultGroupSequence)

      Description copied from interface: `ConstraintMetaData`
      Returns this meta data object's corresponding representation in the descriptor model.
      Specified by:
        `asDescriptor` in interface `ConstraintMetaData`
      Parameters:
        `defaultGroupSequenceRedefined` - Whether the bean hosting the represented element has a redefined default group sequence or not.
        `defaultGroupSequence` - The default group sequence of the bean hosting the represented element.
      Returns:
        This meta data object's corresponding descriptor model representation. Implementations should return a specific sub type of `ElementDescriptor`.

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