public class LRUCodec extends AbstractCodec
Constructor and Description |
---|
LRUCodec() |
Modifier and Type | Method and Description |
---|---|
Object |
createObject(Class<?> clazz,
IDecodingContext context)
Creates the object during decoding.
|
Object |
decodeSubObjects(Object object,
Class<?> clazz,
IDecodingContext context)
Decodes and adds sub-objects during decoding.
|
Object |
encode(Object object,
Class<?> clazz,
List<ITraverseProcessor> processors,
Traverser traverser,
Map<Object,Object> traversed,
boolean clone,
IEncodingContext 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.
|
canReference, decode, process, recordKnownDecodedObject
public boolean isApplicable(Class<?> clazz)
clazz
- The class.public Object createObject(Class<?> clazz, IDecodingContext context)
createObject
in class AbstractCodec
clazz
- The class of the object.context
- The decoding context.public Object decodeSubObjects(Object object, Class<?> clazz, IDecodingContext context)
decodeSubObjects
in class AbstractCodec
object
- The instantiated object.clazz
- The class of the object.context
- The decoding context.public 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, IEncodingContext ec)
encode
in class AbstractCodec
Copyright © 2015. All Rights Reserved.