接口的使用
com.alibaba.ageiport.common.convert.Converter
使用Converter的程序包
-
com.alibaba.ageiport.common.convert中Converter的使用
修饰符和类型类说明class抽象转换器,提供通用的转换逻辑,同时通过convertInternal实现对应类型的专属逻辑
转换器不会抛出转换异常,转换失败时会返回null修饰符和类型方法说明<T> Converter<T>ConverterRegistry.getConverter(Type type, boolean isCustomFirst) 获得转换器<T> Converter<T>ConverterRegistry.getCustomConverter(Type type) 获得自定义转换器<T> Converter<T>ConverterRegistry.getDefaultConverter(Type type) 获得默认转换器修饰符和类型方法说明登记自定义转换器类型变量类型为Converter的com.alibaba.ageiport.common.convert中的方法参数修饰符和类型方法说明登记自定义转换器 -
com.alibaba.ageiport.common.convert.impl中Converter的使用
修饰符和类型类说明class布尔转换器class字符转换器class日期转换器class数字转换器
支持类型为:
java.lang.Bytejava.lang.Shortjava.lang.Integerjava.lang.Longjava.lang.Floatjava.lang.Doublejava.math.BigDecimaljava.math.BigIntegerclass原始类型转换器
支持类型为:
byteshortintlongfloatdoublecharbooleanclass字符串转换器classJDK8中新加入的java.time包对象解析转换器
支持的对象包括: