org.test4j.json.encoder.object
类 SpecEncoder<T>
java.lang.Object
org.test4j.json.encoder.JSONEncoder<T>
org.test4j.json.encoder.object.SpecEncoder<T>
- 直接已知子类:
- MethodEncoder
public abstract class SpecEncoder<T>
- extends JSONEncoder<T>
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpecEncoder
public SpecEncoder(Class clazz)
encode
public boolean encode(T target,
Writer writer,
List<String> references)
- 从类
JSONEncoder 复制的描述
- 将java对象序列化为json字符串
- 指定者:
- 类
JSONEncoder<T> 中的 encode
writer - 序列化字符串输出器
- 返回:
- TODO
encodeSpec
protected abstract void encodeSpec(T target,
Writer writer,
List<String> references)
throws Exception
- 抛出:
Exception
isSpecPoJoEncoder
public static SpecEncoder isSpecPoJoEncoder(Class type)
addSpecEncoder
public static void addSpecEncoder(Class type,
SpecEncoder encoder)
- 添加特殊类型的json编码器
- 参数:
type - encoder -
Copyright © 2013. All rights reserved.