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 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
NULL
public static final TypedValue NULL
TypedValue
public TypedValue(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(Object value,
TypeDescriptor typeDescriptor)
- Create a TypedValue for a particular value with a particular type descriptor.
- Parameters:
value
- the object valuetypeDescriptor
- a type descriptor describing the type of the value
getValue
public Object getValue()
getTypeDescriptor
public TypeDescriptor getTypeDescriptor()
toString
public String toString()
- Overrides:
toString
in class Object