| 限定符和类型 | 字段和说明 |
|---|---|
static EntryConverter |
INSTANCE
单例
|
| 构造器和说明 |
|---|
EntryConverter() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
convert(Type targetType,
Object value)
转换为指定类型
如果类型无法确定,将读取默认值的类型做为目标类型 |
Map.Entry<?,?> |
convert(Type targetType,
Type keyType,
Type valueType,
Object value)
转换对象为指定键值类型的指定类型Map
|
public static final EntryConverter INSTANCE
public Object convert(Type targetType, Object value) throws ConvertException
Converterconvert 在接口中 ConvertertargetType - 目标Type,非泛型类使用value - 原始值,如果对象实现了此接口,则value为thisConvertException - 转换无法正常完成或转换异常时抛出此异常public Map.Entry<?,?> convert(Type targetType, Type keyType, Type valueType, Object value) throws ConvertException
targetType - 目标的Map类型keyType - 键类型valueType - 值类型value - 被转换的值ConvertException - 转换异常或不支持的类型Copyright © 2024. All rights reserved.