接口的使用
org.springframework.core.convert.converter.Converter
使用Converter的程序包 程序包 说明 org.springframework.core.convert.converter SPI to implement Converters for the type conversion system.org.springframework.core.convert.support Default implementation of the type conversion system.org.springframework.core.serializer.support Support classes for Spring's serializer abstraction.org.springframework.core.convert.converter中Converter的使用
返回Converter的org.springframework.core.convert.converter中的方法 修饰符和类型 方法 说明 <T extends R>
Converter<S,T>ConverterFactory. getConverter(Class<T> targetType)
Get the converter to convert from S to target type T, where T is also an instance of R.参数类型为Converter的org.springframework.core.convert.converter中的方法 修饰符和类型 方法 说明 <S,T>
voidConverterRegistry. addConverter(Class<S> sourceType, Class<T> targetType, Converter<? super S,? extends T> converter)
Add a plain converter to this registry.void
ConverterRegistry. addConverter(Converter<?,?> converter)
Add a plain converter to this registry.参数类型为Converter的org.springframework.core.convert.converter中的构造器 构造器 说明 ConvertingComparator(Comparator<T> comparator, Converter<S,T> converter)
Create a newConvertingComparator
instance.ConvertingComparator(Converter<S,T> converter)
Create a newConvertingComparator
instance.org.springframework.core.convert.support中Converter的使用
参数类型为Converter的org.springframework.core.convert.support中的方法 修饰符和类型 方法 说明 <S,T>
voidGenericConversionService. addConverter(Class<S> sourceType, Class<T> targetType, Converter<? super S,? extends T> converter)
void
GenericConversionService. addConverter(Converter<?,?> converter)
org.springframework.core.serializer.support中Converter的使用
实现Converter的org.springframework.core.serializer.support中的类 修饰符和类型 类 说明 class
DeserializingConverter
AConverter
that delegates to aDeserializer
to convert data in a byte array to an object.class
SerializingConverter
AConverter
that delegates to aSerializer
to convert an object to a byte array.