Package jadex.binary
Class TupleCodec
- java.lang.Object
-
- jadex.binary.AbstractCodec
-
- jadex.binary.TupleCodec
-
- All Implemented Interfaces:
IDecoderHandler
,ITraverseProcessor
public class TupleCodec extends AbstractCodec
Codec for encoding and decoding URL objects.
-
-
Constructor Summary
Constructors Constructor Description TupleCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
createObject(java.lang.Class<?> clazz, IDecodingContext context)
Creates the object during decoding.java.lang.Object
decodeSubObjects(java.lang.Object object, java.lang.Class<?> clazz, IDecodingContext context)
Decodes and adds sub-objects during decoding.java.lang.Object
encode(java.lang.Object object, java.lang.Class<?> clazz, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, IEncodingContext ec)
Encode the object.boolean
isApplicable(java.lang.Class<?> clazz)
Tests if the decoder can decode the class.-
Methods inherited from class jadex.binary.AbstractCodec
canReference, decode, isApplicable, isFixedFrame, process, recordKnownDecodedObject
-
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.lang.Class<?> clazz)
Tests if the decoder can decode the class.- Specified by:
isApplicable
in interfaceIDecoderHandler
- Specified by:
isApplicable
in classAbstractCodec
- Parameters:
clazz
- The class.- Returns:
- True, if the decoder can decode this class.
-
createObject
public java.lang.Object createObject(java.lang.Class<?> clazz, IDecodingContext context)
Creates the object during decoding.- Specified by:
createObject
in classAbstractCodec
- Parameters:
clazz
- The class of the object.context
- The decoding context.- Returns:
- The created object.
-
decodeSubObjects
public java.lang.Object decodeSubObjects(java.lang.Object object, java.lang.Class<?> clazz, IDecodingContext context)
Decodes and adds sub-objects during decoding.- Overrides:
decodeSubObjects
in classAbstractCodec
- Parameters:
object
- The instantiated object.clazz
- The class of the object.context
- The decoding context.- Returns:
- The finished object.
-
encode
public java.lang.Object encode(java.lang.Object object, java.lang.Class<?> clazz, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, IEncodingContext ec)
Encode the object.- Specified by:
encode
in classAbstractCodec
-
-