|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLStorable
Classes implementing this interface support serialization in a human-readable XML-based format.
Non-abstract implementations of this interface must support
deserialization by providing a public constructor that accepts a
Element
as single parameter that reads all
relevant field values from the XML element. There is no way to enforce this
convention (as interfaces cannot contain constructors), but
deserialization via
ObjectElement.createObject(org.dom4j.Element,
Class)
will fail when it is violated. Deserialization is based on a
constructor instead of a "restore" or "init" method to allow the
deserialization of immutable objects (whose fields cannot be changed after
construction).
Method Summary | |
---|---|
ObjectElement |
toElement()
Stores all relevant fields of this object in an XML element for serialization. |
Method Detail |
---|
ObjectElement toElement()
ObjectElement.createObject(org.dom4j.Element,
Class)
on the created element.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |