public class ConversionService extends Object
| Constructor and Description |
|---|
ConversionService() |
| Modifier and Type | Method and Description |
|---|---|
<S,T> void |
addConverter(Class<S> sourceType,
Class<T> targetType,
org.springframework.core.convert.converter.Converter<? super S,? extends T> converter) |
static void |
addConverter(org.springframework.core.convert.converter.Converter<?,?> converter) |
static void |
addConverter(org.springframework.core.convert.converter.GenericConverter converter) |
static void |
addConverterFactory(org.springframework.core.convert.converter.ConverterFactory<?,?> factory) |
static boolean |
canBypassConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
static boolean |
canConvert(Class<?> sourceType,
Class<?> targetType) |
static boolean |
canConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
static <T> T |
convert(Object source,
Class<T> targetType) |
static Object |
convert(Object source,
org.springframework.core.convert.TypeDescriptor targetType) |
static Object |
convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
static void |
main(String[] args) |
static void |
removeConvertible(Class<?> sourceType,
Class<?> targetType) |
public static void addConverter(org.springframework.core.convert.converter.Converter<?,?> converter)
converter - GenericConversionService.addConverter(org.springframework.core.convert.converter.Converter)public <S,T> void addConverter(Class<S> sourceType, Class<T> targetType, org.springframework.core.convert.converter.Converter<? super S,? extends T> converter)
sourceType - targetType - converter - GenericConversionService.addConverter(java.lang.Class, java.lang.Class, org.springframework.core.convert.converter.Converter)public static void addConverter(org.springframework.core.convert.converter.GenericConverter converter)
converter - GenericConversionService.addConverter(org.springframework.core.convert.converter.GenericConverter)public static void addConverterFactory(org.springframework.core.convert.converter.ConverterFactory<?,?> factory)
factory - GenericConversionService.addConverterFactory(org.springframework.core.convert.converter.ConverterFactory)public static void removeConvertible(Class<?> sourceType, Class<?> targetType)
sourceType - targetType - GenericConversionService.removeConvertible(java.lang.Class, java.lang.Class)public static boolean canConvert(Class<?> sourceType, Class<?> targetType)
sourceType - targetType - GenericConversionService.canConvert(java.lang.Class, java.lang.Class)public static boolean canConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
sourceType - targetType - GenericConversionService.canConvert(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)public static boolean canBypassConvert(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType)
sourceType - targetType - GenericConversionService.canBypassConvert(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)public static <T> T convert(Object source, Class<T> targetType)
source - targetType - GenericConversionService.convert(java.lang.Object, java.lang.Class)public static Object convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
source - sourceType - targetType - GenericConversionService.convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)public static Object convert(Object source, org.springframework.core.convert.TypeDescriptor targetType)
source - targetType - GenericConversionService.convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor)public static void main(String[] args)
Copyright © 2020. All rights reserved.