Constructor and Description |
---|
RecordConverter(Class<?> recordClass)
构造
|
Modifier and Type | Method and Description |
---|---|
Object |
convert(Object value,
Object defaultValue)
转换为指定类型
如果类型无法确定,将读取默认值的类型做为目标类型 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertWithCheck
public RecordConverter(Class<?> recordClass)
recordClass
- Record类public Object convert(Object value, Object defaultValue) throws IllegalArgumentException
Converter
convert
in interface Converter<Object>
value
- 原始值defaultValue
- 默认值IllegalArgumentException
- 无法确定目标类型,且默认值为null
,无法确定类型Copyright © 2025. All rights reserved.