org.hibernate.validator.spi.valuehandling

## Class ValidatedValueUnwrapper<T>

- java.lang.Object
- - org.hibernate.validator.spi.valuehandling.ValidatedValueUnwrapper<T>

- Type Parameters:
    `T` - the type which can be unwrapped by a specific implementation. The value for this type parameter must either resolve to a non-parameterized type (i.e. because the type is not using generics or because the raw type is used instead of the generic version) or all of its own type parameters must be unbounded wildcard types (i.e. ).

      public abstract class ValidatedValueUnwrapper<T>
      extends Object

  Implementations unwrap given elements prior to validation.

  Unwrapper implementations can be registered when bootstrapping a validator or validator factory. Note that when more than one unwrapper implementation is suitable to unwrap a given element, it is not specified which of the implementations is chosen.

  Implementations must be thread-safe.

  Author:
    Gunnar Morling
  Experimental
    This SPI is considered experimental and may change in future revisions

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidatedValueUnwrapper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Type` | `getValidatedValueType(Type valueType)` Retrieves the declared (static) type of the unwrapped object as to be used for constraint validator resolution.
    `abstract Object` | `handleValidatedValue(T value)` Retrieves the value to be validated from the given wrapper object.

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

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

- - ### Constructor Detail

    - #### ValidatedValueUnwrapper

          public ValidatedValueUnwrapper()

  - ### Method Detail

    - #### handleValidatedValue

          public abstract Object handleValidatedValue(T value)

      Retrieves the value to be validated from the given wrapper object.
      Parameters:
        `value` - the wrapper object to retrieve the value from
      Returns:
        the unwrapped value to be validated

    - #### getValidatedValueType

          public abstract Type getValidatedValueType(Type valueType)

      Retrieves the declared (static) type of the unwrapped object as to be used for constraint validator resolution.
      Parameters:
        `valueType` - the declared type of the wrapper object
      Returns:
        the declared type of the unwrapped object

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