Package org.aoju.bus.core.convert
Interface TypeConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
类型转换接口函数,根据给定的值和目标类型,由用户自定义转换规则。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
-
Method Details
-
convert
转换为指定类型 如果类型无法确定,将读取默认值的类型做为目标类型- Parameters:
targetType- 目标Type,非泛型类使用value- 原始值- Returns:
- 转换后的值
- Throws:
IllegalArgumentException- 无法确定目标类型,且默认值为null,无法确定类型
-