|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.logdoc.AbstractLogdocSerializable
Abstract base class for LogdocSerializable
implementations,
with support for lazy initialization.
Constructor Summary | |
protected |
AbstractLogdocSerializable()
Constructs a new AbstractLogdocSerializable instance. |
Method Summary | |
protected abstract String |
initialize()
Initializes this object. |
void |
serialize(LogdocStringBuffer buffer)
Serializes this object for logging to the specified string buffer (wrapper method). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractLogdocSerializable()
AbstractLogdocSerializable
instance. This
constructor is only available for subclasses.
Method Detail |
public final void serialize(LogdocStringBuffer buffer) throws NullPointerException
serialize(LogdocStringBuffer)
is immediately called, otherwise initialize()
is called first,
to initialize this object.
serialize
in interface LogdocSerializable
buffer
- the LogdocStringBuffer
to serialize to, cannot be
null
.
NullPointerException
- if buffer == null
(this is checked only after
the optional initialization is performed).protected abstract String initialize()
serialize(LogdocStringBuffer)
is called. It should return the
serialized form of this object which will from then on be returned from
serialize(LogdocStringBuffer)
.
serialize(LogdocStringBuffer)
, a
null
will be interpreted as an empty string.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |