public interface PofContext extends Serializer
| Modifier and Type | Method and Description |
|---|---|
Class |
getClass(int nTypeId)
Determine the class associated with the given user type identifier.
|
String |
getClassName(int nTypeId)
Determine the name of the class associated with the given user type
identifier.
|
PofSerializer |
getPofSerializer(int nTypeId)
Return a PofSerializer that can be used to serialize and deserialize an
object of the specified user type to and from a POF stream.
|
int |
getUserTypeIdentifier(Class clz)
Determine the user type identifier associated with the given class.
|
int |
getUserTypeIdentifier(Object o)
Determine the user type identifier associated with the given object.
|
int |
getUserTypeIdentifier(String sClass)
Determine the user type identifier associated with the given class
name.
|
default boolean |
isPreferJavaTime()
Return
true if PofReader.readObject(int) method should
return the appropriate Java 8 date/time type, or false if a legacy
date/time types should be returned in order to preserve backwards
compatibility. |
boolean |
isUserType(Class clz)
Determine if the given class is a user type known to this PofContext.
|
boolean |
isUserType(Object o)
Determine if the given object is of a user type known to this
PofContext.
|
boolean |
isUserType(String sClass)
Determine if the class with the given name is a user type known to this
PofContext.
|
deserialize, deserialize, getName, serializePofSerializer getPofSerializer(int nTypeId)
nTypeId - the type identifier of the user type that can be
serialized and deserialized using the returned
PofSerializer; must be non-negativeIllegalArgumentException - if the specified user type is
negative or unknown to this PofContextint getUserTypeIdentifier(Object o)
o - an instance of a user type; must not be nullIllegalArgumentException - if the user type associated with the
given object is unknown to this PofContext or if the object is
nullint getUserTypeIdentifier(Class clz)
clz - a user type class; must not be nullIllegalArgumentException - if the user type associated with the
given class is unknown to this PofContext or if the class is
nullint getUserTypeIdentifier(String sClass)
sClass - the name of a user type class; must not be nullIllegalArgumentException - if the user type associated with the
given class name is unknown to this PofContext or if the class
name is nullString getClassName(int nTypeId)
nTypeId - the user type identifier; must be non-negativeIllegalArgumentException - if the specified user type is
negative or unknown to this PofContextClass getClass(int nTypeId)
nTypeId - the user type identifier; must be non-negativeIllegalArgumentException - if the specified user type is
negative or unknown to this PofContextboolean isUserType(Object o)
o - the object to test; must not be nullIllegalArgumentException - if the given object is nullboolean isUserType(Class clz)
clz - the class to test; must not be nullIllegalArgumentException - if the given class is nullboolean isUserType(String sClass)
sClass - the name of the class to test; must not be nullIllegalArgumentException - if the given class name is nulldefault boolean isPreferJavaTime()
true if PofReader.readObject(int) method should
return the appropriate Java 8 date/time type, or false if a legacy
date/time types should be returned in order to preserve backwards
compatibility.true if Java 8 date/time types should be preferred over
legacy types