public interface Converter
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Class<?> sourceType,
Class<?> targetType)
Indicates whether this converter is capable of converting the given
sourceType to the targetType . |
<T> T |
convert(Object original,
Class<?> sourceType,
Class<T> targetType)
Converts the given object into another using the source type to find the conversion path.
|
default <T> T |
convert(Object original,
Class<T> targetType)
Converts the given object into another.
|
default <T> SerializedObject<T> |
convert(SerializedObject<?> original,
Class<T> targetType)
Converts the data format of the given
original IntermediateRepresentation to the target data type. |
boolean canConvert(Class<?> sourceType, Class<?> targetType)
sourceType
to the targetType
.sourceType
- The type of data to convert fromtargetType
- The type of data to convert totrue
if conversion is possible, false
otherwisedefault <T> T convert(Object original, Class<T> targetType)
T
- the target data typeoriginal
- the value to converttargetType
- The type of data to convert to<T> T convert(Object original, Class<?> sourceType, Class<T> targetType)
T
- the target data typeoriginal
- the value to convertsourceType
- the type of data to converttargetType
- The type of data to convert todefault <T> SerializedObject<T> convert(SerializedObject<?> original, Class<T> targetType)
original
IntermediateRepresentation to the target data type.T
- the target data typeoriginal
- The source to converttargetType
- The type of data to convert toCopyright © 2010–2023. All rights reserved.