org.springframework.expression

## Class TypedValue

- java.lang.Object
- - org.springframework.expression.TypedValue

- Direct Known Subclasses:
    BooleanTypedValue

      public class TypedValue
      extends Object

  Encapsulates an object and a `TypeDescriptor` that describes it. The type descriptor can contain generic declarations that would not be accessible through a simple `getClass()` call on the object.
  Since:
    3.0
  Author:
    Andy Clement, Juergen Hoeller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypedValue` | `NULL` `TypedValue` for `null`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypedValue(Object value)` Create a `TypedValue` for a simple object.
    `TypedValue(Object value, TypeDescriptor typeDescriptor)` Create a `TypedValue` for a particular value with a particular `TypeDescriptor` which may contain additional generic declarations.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `TypeDescriptor` | `getTypeDescriptor()`
    `Object` | `getValue()`
    `int` | `hashCode()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### NULL

          public static final TypedValue NULL

      `TypedValue` for `null`.

  - ### Constructor Detail

    - #### TypedValue

          public TypedValue(@Nullable
                            Object value)

      Create a `TypedValue` for a simple object. The `TypeDescriptor` is inferred from the object, so no generic declarations are preserved.
      Parameters:
        `value` - the object value

    - #### TypedValue

          public TypedValue(@Nullable
                            Object value,
                            @Nullable
                            TypeDescriptor typeDescriptor)

      Create a `TypedValue` for a particular value with a particular `TypeDescriptor` which may contain additional generic declarations.
      Parameters:
        `value` - the object value
        `typeDescriptor` - a type descriptor describing the type of the value

  - ### Method Detail

    - #### getValue

          @Nullable
          public Object getValue()

    - #### getTypeDescriptor

          @Nullable
          public TypeDescriptor getTypeDescriptor()

    - #### equals

          public boolean equals(@Nullable
                                Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`