- java.lang.Object
-
- org.redkale.convert.ObjectDecoder<R,T>
-
- 类型参数:
R
- Reader输入的子类T
- 反解析的数据类型
- 所有已实现的接口:
Decodeable<R,T>
- 直接已知子类:
ProtobufObjectDecoder
public class ObjectDecoder<R extends Reader,T> extends Object implements Decodeable<R,T>
自定义对象的反序列化操作类详情见: https://redkale.org
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Creator<T>
creator
protected DeMember<R,T,?>[]
creatorConstructorMembers
protected ConvertFactory
factory
protected boolean
inited
protected DeMemberInfo
memberInfo
protected Type
type
protected Class
typeClass
-
构造器概要
构造器 限定符 构造器 说明 protected
ObjectDecoder(Type type)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
afterInitDeMember(ConvertFactory factory)
protected void
checkInited()
T
convertFrom(R in)
对象格式: [0x1][short字段个数][字段名][字段值]...[0x2]DeMember<R,T,?>[]
getConstructorMembers()
Creator<T>
getCreator()
DeMemberInfo
getMemberInfo()
DeMember[]
getMembers()
Type
getType()
泛型映射接口void
init(ConvertFactory factory)
protected void
initFieldMember(DeMember[] deMembers)
protected void
initForEachDeMember(ConvertFactory factory, DeMember member)
protected Object
readDeMemberValue(R in, DeMember member)
protected void
setIndex(DeMember member, int index)
protected void
setPosition(DeMember member, int position)
protected void
setTag(DeMember member, int tag)
protected void
setTagSize(DeMember member, int tagSize)
String
toString()
-
-
-
字段详细资料
-
type
protected final Type type
-
typeClass
protected final Class typeClass
-
memberInfo
protected DeMemberInfo memberInfo
-
factory
@Nullable protected ConvertFactory factory
-
inited
protected volatile boolean inited
-
-
构造器详细资料
-
ObjectDecoder
protected ObjectDecoder(Type type)
-
-
方法详细资料
-
init
public void init(ConvertFactory factory)
-
initFieldMember
protected void initFieldMember(DeMember[] deMembers)
-
checkInited
protected void checkInited()
-
convertFrom
public T convertFrom(R in)
对象格式: [0x1][short字段个数][字段名][字段值]...[0x2]- 指定者:
convertFrom
在接口中Decodeable<R extends Reader,T>
- 参数:
in
- 输入流- 返回:
- 反解析后的对象结果
-
initForEachDeMember
protected void initForEachDeMember(ConvertFactory factory, DeMember member)
-
afterInitDeMember
protected void afterInitDeMember(ConvertFactory factory)
-
setTag
protected void setTag(DeMember member, int tag)
-
setTagSize
protected void setTagSize(DeMember member, int tagSize)
-
setIndex
protected void setIndex(DeMember member, int index)
-
setPosition
protected void setPosition(DeMember member, int position)
-
getType
public Type getType()
从接口复制的说明:Decodeable
泛型映射接口- 指定者:
getType
在接口中Decodeable<R extends Reader,T>
- 返回:
- 反解析的数据类型
-
getMembers
public DeMember[] getMembers()
-
getMemberInfo
public DeMemberInfo getMemberInfo()
-
-