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