org.test4j.json.decoder.base
类 BaseDecoder

java.lang.Object
  继承者 org.test4j.json.decoder.base.BaseDecoder
所有已实现的接口:
IDecoder
直接已知子类:
ArrayDecoder, CollectionDecoder, FixedTypeDecoder, MapPoJoBaseDecoder, SpecTypeDecoder

public abstract class BaseDecoder
extends Object
implements IDecoder

json串解码器基类
解码:从json字符串反序列为java对象
加码:将java对象序列化为json字符串

作者:
darui.wudr

构造方法摘要
BaseDecoder()
           
 
方法摘要
protected  Type getArgType(ParameterizedType type, int index)
          获取第n个泛型变量,n从0开始
protected  DecoderException getError(String value, String to)
           
protected  DecoderException getError(String value, String to, Throwable e)
           
protected  Class getRawType(Type type, Class _default)
           
protected  boolean isInterfaceOrAbstract(Type type)
           
protected
<T> T
newInstance(Type type)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 org.test4j.json.decoder.IDecoder 继承的方法
accept, decode
 

构造方法详细信息

BaseDecoder

public BaseDecoder()
方法详细信息

getError

protected DecoderException getError(String value,
                                    String to)

getError

protected DecoderException getError(String value,
                                    String to,
                                    Throwable e)

getArgType

protected Type getArgType(ParameterizedType type,
                          int index)
获取第n个泛型变量,n从0开始

参数:
type -
index -
返回:

getRawType

protected Class getRawType(Type type,
                           Class _default)

isInterfaceOrAbstract

protected boolean isInterfaceOrAbstract(Type type)

newInstance

protected <T> T newInstance(Type type)


Copyright © 2013. All rights reserved.