|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConversionService
A service interface for type conversion. This is the entry point into the convert system.
Call convert(Object, Class)
to perform a thread-safe type conversion using this system.
Method Summary | ||
---|---|---|
boolean |
canConvert(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
Returns true if objects of sourceType can be converted to targetType. |
|
boolean |
canConvert(TypeDescriptor sourceType,
TypeDescriptor targetType)
Returns true if objects of sourceType can be converted to the targetType. |
|
|
convert(java.lang.Object source,
java.lang.Class<T> targetType)
Convert the source to targetType. |
|
java.lang.Object |
convert(java.lang.Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType)
Convert the source to targetType. |
Method Detail |
---|
boolean canConvert(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)
sourceType
- the source type to convert from (required)targetType
- the target type to convert to (required)
<T> T convert(java.lang.Object source, java.lang.Class<T> targetType)
source
- the source object to convert (may be null)targetType
- the target type to convert to (required)
ConversionException
- if an exception occurredboolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType)
sourceType
- context about the source type to convert from (required)targetType
- context about the target type to convert to (required)
java.lang.Object convert(java.lang.Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
source
- the source object to convert (may be null)sourceType
- context about the source type converting from (required)targetType
- context about the target type to convert to (required)
targetType
ConversionException
- if an exception occurred
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |