Package org.miaixz.bus.core.convert
Class KBeanConverter
java.lang.Object
org.miaixz.bus.core.convert.KBeanConverter
- All Implemented Interfaces:
Serializable,Converter,MatcherConverter
Kotlin Bean转换器,支持:
Map = Bean Bean = Bean ValueProvider = Bean
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Details
-
INSTANCE
单例对象
-
-
Constructor Details
-
KBeanConverter
public KBeanConverter()
-
-
Method Details
-
match
Description copied from interface:MatcherConverter判断需要转换的对象是否匹配当前转换器,满足则转换,否则跳过- Specified by:
matchin interfaceMatcherConverter- Parameters:
targetType- 转换的目标类型,不能为nullrawType- 目标原始类型,当targetType为Class时,和此参数一致,不能为nullvalue- 需要转换的值- Returns:
- 是否匹配
-
convert
Description copied from interface:Converter转换为指定类型 如果类型无法确定,将读取默认值的类型做为目标类型- Specified by:
convertin interfaceConverter- Parameters:
targetType- 目标Type,非泛型类使用value- 原始值,如果对象实现了此接口,则value为this- Returns:
- 转换后的值
- Throws:
ConvertException- 转换无法正常完成或转换异常时抛出此异常
-