|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.expression.spel.support.StandardTypeConverter
public class StandardTypeConverter
Default implementation of the TypeConverter
interface,
delegating to a core Spring ConversionService
.
ConversionService
Constructor Summary | |
---|---|
StandardTypeConverter()
|
|
StandardTypeConverter(ConversionService conversionService)
|
Method Summary | |
---|---|
boolean |
canConvert(Class<?> sourceType,
Class<?> targetType)
Return true if the type converter can convert the specified type to the desired target type. |
boolean |
canConvert(TypeDescriptor sourceType,
TypeDescriptor targetType)
Return true if the type converter can convert the specified type to the desired target type. |
Object |
convertValue(Object value,
TypeDescriptor sourceType,
TypeDescriptor targetType)
Convert (may coerce) a value from one type to another, for example from a boolean to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardTypeConverter()
public StandardTypeConverter(ConversionService conversionService)
Method Detail |
---|
public boolean canConvert(Class<?> sourceType, Class<?> targetType)
TypeConverter
canConvert
in interface TypeConverter
sourceType
- the type to be converted fromtargetType
- the type to be converted to
public boolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType)
TypeConverter
canConvert
in interface TypeConverter
sourceType
- a type descriptor that describes the source typetargetType
- a type descriptor that describes the requested result type
public Object convertValue(Object value, TypeDescriptor sourceType, TypeDescriptor targetType)
TypeConverter
convertValue
in interface TypeConverter
value
- the value to be convertedsourceType
- a type descriptor that supplies extra information about the source objecttargetType
- a type descriptor that supplies extra information about the requested result type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |