Spring Framework

org.springframework.expression
Class TypedValue

java.lang.Object
  extended by org.springframework.expression.TypedValue
Direct Known Subclasses:
BooleanTypedValue

public class TypedValue
extends java.lang.Object

Encapsulates an object and a type descriptor that describes it. The type descriptor can hold generic information that would not be accessible through a simple getClass() call on the object.

Since:
3.0
Author:
Andy Clement, Juergen Hoeller

Field Summary
static TypedValue NULL
           
 
Constructor Summary
TypedValue(java.lang.Object value)
          Create a TypedValue for a simple object.
TypedValue(java.lang.Object value, TypeDescriptor typeDescriptor)
          Create a TypedValue for a particular value with a particular type descriptor.
 
Method Summary
 TypeDescriptor getTypeDescriptor()
           
 java.lang.Object getValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final TypedValue NULL
Constructor Detail

TypedValue

public TypedValue(java.lang.Object value)
Create a TypedValue for a simple object. The type descriptor is inferred from the object, so no generic information is preserved.

Parameters:
value - the object value

TypedValue

public TypedValue(java.lang.Object value,
                  TypeDescriptor typeDescriptor)
Create a TypedValue for a particular value with a particular type descriptor.

Parameters:
value - the object value
typeDescriptor - a type descriptor describing the type of the value
Method Detail

getValue

public java.lang.Object getValue()

getTypeDescriptor

public TypeDescriptor getTypeDescriptor()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Framework