convert(Object, Class) to perform a thread-safe type conversion using this system.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a conversion can be performed, false if notthe source type to convert from (may be sourceType, Class<?> null if source is null)the target type to convert to (required) targetType)Return |
| public boolean | Returns: true if a conversion can be performed between the source and target types,
false if notcontext about the source type to convert from
(may be sourceType, TypeDescriptor null if source is null)context about the target type to convert to (required) targetType)Return |
| public <T> T | |
| public default Object | Returns: the converted valuethe source object source, TypeDescriptor the target type targetType)Convert the given |
| public Object | Returns: the converted object, an instance oftargetTypethe source object to convert (may be source, TypeDescriptor null)context about the source type to convert from
(may be sourceType, TypeDescriptor null if source is null)context about the target type to convert to (required) targetType)Convert the given |
| canConvert | back to summary |
|---|---|
| public boolean canConvert(Class<?> sourceType, Class<?> targetType) Return If this method returns Special note on collections, arrays, and maps types:
For conversion between collection, array, and map types, this method will return
| |
| canConvert | back to summary |
|---|---|
| public boolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType) Return If this method returns Special note on collections, arrays, and maps types:
For conversion between collection, array, and map types, this method will return
| |
| convert | back to summary |
|---|---|
| public <T> T convert(Object source, Class<T> targetType) Convert the given
| |
| convert | back to summary |
|---|---|
| public default Object convert(Object source, TypeDescriptor targetType) Convert the given Delegates to
| |
| convert | back to summary |
|---|---|
| public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Convert the given
| |