public class MapConverter extends AbstractConverter<Map<?,?>>
Map 转换器| Constructor and Description |
|---|
MapConverter(Type mapType)
构造,Map的key和value泛型类型自动获取
|
MapConverter(Type mapType,
Type keyType,
Type valueType)
构造
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<?,?> |
convertInternal(Object value)
内部转换器,被
AbstractConverter.convert(Object, Object) 调用,实现基本转换逻辑内部转换器转换后如果转换失败可以做如下操作,处理结果都为返回默认值: 1、返回 null
2、抛出一个RuntimeException异常
|
Class<Map<?,?>> |
getTargetType()
获得此类实现类的泛型类型
|
convert, convertQuietly, convertToStrclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertWithCheckpublic MapConverter(Type mapType)
mapType - Map类型protected Map<?,?> convertInternal(Object value)
AbstractConverterAbstractConverter.convert(Object, Object) 调用,实现基本转换逻辑1、返回null2、抛出一个RuntimeException异常
convertInternal in class AbstractConverter<Map<?,?>>value - 值public Class<Map<?,?>> getTargetType()
AbstractConvertergetTargetType in class AbstractConverter<Map<?,?>>nullCopyright © 2025. All rights reserved.