public class NumberCodec2 extends AbstractCodec
| Modifier and Type | Field and Description |
|---|---|
static NumberCodec2 |
INSTANCE
Default Instance
|
protected static java.util.Set<java.lang.Class<?>> |
TYPES
The types this processor can handle.
|
| Constructor and Description |
|---|
NumberCodec2() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canReference(java.lang.Object object,
java.lang.Class<?> clazz,
IEncodingContext ec)
Prevent references for primitive-wrapped types.
|
java.lang.Object |
createObject(java.lang.Class<?> clazz,
IDecodingContext context)
Creates the object during decoding.
|
java.lang.Object |
encode(java.lang.Object object,
java.lang.Class<?> clazz,
java.util.List<ITraverseProcessor> processors,
Traverser traverser,
java.util.Map<java.lang.Object,java.lang.Object> traversed,
boolean clone,
IEncodingContext ec)
Encode the object.
|
boolean |
isApplicable(java.lang.Class<?> clazz)
Tests if the decoder can decode the class.
|
boolean |
isApplicable(java.lang.Object object,
java.lang.Class<?> clazz,
boolean clone,
java.lang.ClassLoader targetcl)
Test if the processor is applicable.
|
void |
recordKnownDecodedObject(java.lang.Object object,
IDecodingContext context)
References handling not needed.
|
decode, decodeSubObjects, isApplicable, process, runPreProcessorspublic static final NumberCodec2 INSTANCE
protected static final java.util.Set<java.lang.Class<?>> TYPES
public boolean isApplicable(java.lang.Class<?> clazz)
isApplicable in interface IDecoderHandlerisApplicable in class AbstractCodecclazz - The class.public java.lang.Object createObject(java.lang.Class<?> clazz,
IDecodingContext context)
createObject in class AbstractCodecclazz - The class of the object.context - The decoding context.public void recordKnownDecodedObject(java.lang.Object object,
IDecodingContext context)
recordKnownDecodedObject in class AbstractCodecpublic boolean isApplicable(java.lang.Object object,
java.lang.Class<?> clazz,
boolean clone,
java.lang.ClassLoader targetcl)
object - The object.targetcl - If not null, the traverser should make sure that the result object is compatible with the class loader,
e.g. by cloning the object using the class loaded from the target class loader.public java.lang.Object encode(java.lang.Object object,
java.lang.Class<?> clazz,
java.util.List<ITraverseProcessor> processors,
Traverser traverser,
java.util.Map<java.lang.Object,java.lang.Object> traversed,
boolean clone,
IEncodingContext ec)
encode in class AbstractCodecpublic boolean canReference(java.lang.Object object,
java.lang.Class<?> clazz,
IEncodingContext ec)
canReference in class AbstractCodecobject - The current object.clazz - The class.ec - The encoding context.