Package jadex.binary
Class StringCodec
- java.lang.Object
- 
- jadex.binary.AbstractCodec
- 
- jadex.binary.StringCodec
 
 
- 
- All Implemented Interfaces:
- IDecoderHandler,- ITraverseProcessor
 
 public class StringCodec extends AbstractCodec Codec for encoding and decoding String objects.
- 
- 
Constructor SummaryConstructors Constructor Description StringCodec()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReference(java.lang.Object object, java.lang.Class<?> clazz, IEncodingContext ec)Test if the codec allows referencing.java.lang.ObjectcreateObject(java.lang.Class<?> clazz, IDecodingContext context)Creates the object during decoding.java.lang.Objectencode(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.booleanisApplicable(java.lang.Class<?> clazz)Tests if the decoder can decode the class.voidrecordKnownDecodedObject(java.lang.Object object, IDecodingContext context)References handling not needed, handled by string pool.- 
Methods inherited from class jadex.binary.AbstractCodecdecode, decodeSubObjects, isApplicable, isFixedFrame, process
 
- 
 
- 
- 
- 
Method Detail- 
isApplicablepublic boolean isApplicable(java.lang.Class<?> clazz) Tests if the decoder can decode the class.- Specified by:
- isApplicablein interface- IDecoderHandler
- Specified by:
- isApplicablein class- AbstractCodec
- Parameters:
- clazz- The class.
- Returns:
- True, if the decoder can decode this class.
 
 - 
createObjectpublic java.lang.Object createObject(java.lang.Class<?> clazz, IDecodingContext context)Creates the object during decoding.- Specified by:
- createObjectin class- AbstractCodec
- Parameters:
- clazz- The class of the object.
- context- The decoding context.
- Returns:
- The created object.
 
 - 
recordKnownDecodedObjectpublic void recordKnownDecodedObject(java.lang.Object object, IDecodingContext context)References handling not needed, handled by string pool.- Overrides:
- recordKnownDecodedObjectin class- AbstractCodec
 
 - 
encodepublic 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:
- encodein class- AbstractCodec
 
 - 
canReferencepublic boolean canReference(java.lang.Object object, java.lang.Class<?> clazz, IEncodingContext ec)Description copied from class:AbstractCodecTest if the codec allows referencing.- Overrides:
- canReferencein class- AbstractCodec
- Parameters:
- object- The object.
- clazz- The class.
- ec- The encoding context.
- Returns:
- True, if the codec allows referencing.
 
 
- 
 
-