org.test4j.json.decoder.base
类 MapPoJoBaseDecoder<E>
java.lang.Object
org.test4j.json.decoder.base.BaseDecoder
org.test4j.json.decoder.base.MapPoJoBaseDecoder<E>
- 所有已实现的接口:
- IDecoder
- 直接已知子类:
- MapDecoder, PoJoDecoder
public abstract class MapPoJoBaseDecoder<E>
- extends BaseDecoder
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapPoJoBaseDecoder
public MapPoJoBaseDecoder()
decode
public final <T> T decode(JSONObject json,
Type toType,
Map<String,Object> references)
- 从接口
IDecoder 复制的描述
- 将json串反序列为对象
- 返回:
getTarget
protected abstract E getTarget(JSONMap map,
Type toType)
getTargetType
protected Class getTargetType(Type toType,
JSONMap map)
- 根据JSONMap在#class属性或者 Decoder传进来的class创建对象实例
如果实例被标记了ReferenceID,往references中追加一条记录
- 参数:
map - references -
- 返回:
parseFromJSONMap
protected abstract void parseFromJSONMap(E target,
JSONMap jsonMap,
Map<String,Object> references)
- 解析jsonMap属性,填充target对象的值
- 参数:
target - jsonMap - references -
Copyright © 2013. All rights reserved.