Package one.nio.serial
Class MethodSerializer<T>
- java.lang.Object
-
- one.nio.serial.Serializer<T>
-
- one.nio.serial.MethodSerializer<T>
-
- All Implemented Interfaces:
Externalizable,Serializable
public class MethodSerializer<T> extends Serializer<T>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intargCountprotected Methodmethod-
Fields inherited from class one.nio.serial.Serializer
cls, descriptor, origin, uid
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMethodSerializer(Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalcSize(T obj, CalcSizeStream css)TfromJson(JsonReader in)Methodmethod()Tread(DataStream in)voidreadExternal(ObjectInput in)voidskip(DataStream in)voidskipExternal(ObjectInput in)voidtoJson(StringBuilder sb)voidtoJson(T obj, StringBuilder builder)StringtoString()voidwrite(T obj, DataStream out)voidwriteExternal(ObjectOutput out)-
Methods inherited from class one.nio.serial.Serializer
cls, code, deserialize, equals, fromString, generateUid, hashCode, persist, serialize, sizeOf, uid, uniqueName
-
-
-
-
Field Detail
-
method
protected Method method
-
argCount
protected int argCount
-
-
Constructor Detail
-
MethodSerializer
protected MethodSerializer(Method method)
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classSerializer<T>- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classSerializer<T>- Throws:
IOExceptionClassNotFoundException
-
skipExternal
public void skipExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Overrides:
skipExternalin classSerializer<T>- Throws:
IOExceptionClassNotFoundException
-
toJson
public void toJson(StringBuilder sb)
- Overrides:
toJsonin classSerializer<T>
-
toString
public String toString()
- Overrides:
toStringin classSerializer<T>
-
method
public Method method()
-
calcSize
public void calcSize(T obj, CalcSizeStream css) throws IOException
- Specified by:
calcSizein classSerializer<T>- Throws:
IOException
-
write
public void write(T obj, DataStream out) throws IOException
- Specified by:
writein classSerializer<T>- Throws:
IOException
-
read
public T read(DataStream in) throws IOException, ClassNotFoundException
- Specified by:
readin classSerializer<T>- Throws:
IOExceptionClassNotFoundException
-
skip
public void skip(DataStream in) throws IOException, ClassNotFoundException
- Specified by:
skipin classSerializer<T>- Throws:
IOExceptionClassNotFoundException
-
toJson
public void toJson(T obj, StringBuilder builder) throws IOException
- Specified by:
toJsonin classSerializer<T>- Throws:
IOException
-
fromJson
public T fromJson(JsonReader in) throws IOException, ClassNotFoundException
- Specified by:
fromJsonin classSerializer<T>- Throws:
IOExceptionClassNotFoundException
-
-