public class StringCodec extends AbstractCodec
| Constructor and Description |
|---|
StringCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canReference(Object object,
Class<?> clazz,
EncodingContext ec)
Test if the codec allows referencing.
|
Object |
createObject(Class<?> clazz,
DecodingContext context)
Creates the object during decoding.
|
Object |
encode(Object object,
Class<?> clazz,
List<ITraverseProcessor> processors,
Traverser traverser,
Map<Object,Object> traversed,
boolean clone,
EncodingContext ec)
Encode the object.
|
boolean |
isApplicable(Class<?> clazz)
Tests if the decoder can decode the class.
|
boolean |
isApplicable(Object object,
Class<?> clazz,
boolean clone,
ClassLoader targetcl)
Test if the processor is applicable.
|
void |
recordKnownDecodedObject(Object object,
DecodingContext context)
References handling not needed, handled by string pool.
|
decode, decodeSubObjects, processpublic boolean isApplicable(Class<?> clazz)
clazz - The class.public Object createObject(Class<?> clazz, DecodingContext context)
createObject in class AbstractCodecclazz - The class of the object.context - The decoding context.public void recordKnownDecodedObject(Object object, DecodingContext context)
recordKnownDecodedObject in class AbstractCodecpublic boolean isApplicable(Object object, Class<?> clazz, boolean clone, 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 Object encode(Object object, Class<?> clazz, List<ITraverseProcessor> processors, Traverser traverser, Map<Object,Object> traversed, boolean clone, EncodingContext ec)
encode in class AbstractCodecpublic boolean canReference(Object object, Class<?> clazz, EncodingContext ec)
AbstractCodeccanReference in class AbstractCodecobject - The object.clazz - The class.ec - The encoding context.Copyright © 2013. All Rights Reserved.