public interface Converter
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
Returns true if objects of sourceType can be converted to targetType.
|
<T> T |
convert(java.lang.Object source,
java.lang.Class<T> targetType)
Convert the source to targetType.
|
boolean canConvert(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
convert(Object, Class) is capable of converting an instance of sourceType to targetType.sourceType - the source type to convert when (may be null if source is null)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)