public class EncodableObject extends DataObject implements TextEncodable
Constructor and Description |
---|
EncodableObject() |
Modifier and Type | Method and Description |
---|---|
protected TextDecoder |
decode(TextDecoder td)
Override this to decode the fields that you want to decode.
|
protected void |
decoded(String from)
This method is called after the base implementation of textDecode() is executed.
|
protected void |
decoded(TextDecoder td)
This is called after standard decoding is done.
|
TextDecoder |
decodeFields(Field[] fields,
TextDecoder td,
String baseName)
You can call this within your decode(TextDecoder te) method to encode specific
fields.
|
TextDecoder |
decodeFields(String fieldNames,
TextDecoder td,
String baseName)
You can call this within your decode(TextDecoder te) method to encode specific
fields.
|
protected TextEncoder |
encode(TextEncoder te)
Override this to encode the fields that you want to encode.
|
protected String |
encoded(String to)
This method is called after the base implementation of textEncode() is executed.
|
protected void |
encoded(TextEncoder to)
This is called after standard encoding is done.
|
TextEncoder |
encodeFields(Field[] fields,
TextEncoder te,
String baseName)
You can call this within your encode(TextEncoder te) method to encode specific
fields.
|
TextEncoder |
encodeFields(String fieldNames,
TextEncoder te,
String baseName)
You can call this within your encode(TextEncoder te) method to encode specific
fields.
|
void |
textDecode(String txt)
You can override this to decode a String representation of the Object as
encoded by textEncode, but it is easier to override decode(TextDecoder te).
|
String |
textEncode()
You can override this to encode the object as a String, but it is easier to override
encode(TextEncoder te).
|
_getFieldType, _getSetField, cache, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getMyFieldList, getNew
public String textEncode()
textEncode
in interface TextEncodable
public void textDecode(String txt)
textDecode
in interface TextEncodable
public TextEncoder encodeFields(Field[] fields, TextEncoder te, String baseName)
fields
- An array of fields.te
- A TextEncoder object.baseName
- Either the fully qualified class and package name or the class name (without package) of the object.public TextEncoder encodeFields(String fieldNames, TextEncoder te, String baseName)
fieldNames
- A comma separated list of field names.te
- A TextEncoder object.baseName
- Either the fully qualified class and package name or the class name (without package) of the object.public TextDecoder decodeFields(String fieldNames, TextDecoder td, String baseName)
fieldNames
- A comma separated list of field names.td
- A TextDecoder object.baseName
- Either the fully qualified class and package name or the class name (without package) of the object.public TextDecoder decodeFields(Field[] fields, TextDecoder td, String baseName)
fields
- A list of fields.td
- A TextDecoder object.baseName
- Either the fully qualified class and package name or the class name (without package) of the object.protected TextEncoder encode(TextEncoder te)
protected TextDecoder decode(TextDecoder td)
protected void encoded(TextEncoder to)
to
- the TextEncoder that was used.protected void decoded(TextDecoder td)
to
- the TextDecoder that was used.protected void decoded(String from)
from
- The String this object was decoded from.protected String encoded(String to)
to
- the String the object has been encoded to.