public static class XMLFormat.Default extends XMLFormat<Object>
plain text format; this XML representation consists
of the plain text representation of the object as a "value" attribute.XMLFormat.Default, XMLFormat.InputElement, XMLFormat.OutputElement| Constructor and Description |
|---|
XMLFormat.Default()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReferenceable()
Indicates if the object serialized through this format can be referenced
to (default
true). |
Object |
newInstance(Class<?> cls,
XMLFormat.InputElement xml)
Allocates a new object of the specified class from the specified
XML input element.
|
void |
read(XMLFormat.InputElement xml,
Object obj)
Parses an XML input element into the specified object.
|
void |
write(Object obj,
XMLFormat.OutputElement xml)
Formats an object into the specified XML output element.
|
public boolean isReferenceable()
XMLFormattrue). This method can be overriden to return
false if serialized objects are manipulated "by value".isReferenceable in class XMLFormat<Object>true if serialized object may hold a reference;
false otherwise.XMLReferenceResolverpublic Object newInstance(Class<?> cls, XMLFormat.InputElement xml) throws XMLStreamException
XMLFormatnewInstance in class XMLFormat<Object>cls - the class of the object to return.xml - the XML input element.XMLStreamExceptionpublic void read(XMLFormat.InputElement xml, Object obj) throws XMLStreamException
XMLFormatread in class XMLFormat<Object>xml - the XML element to parse.obj - the object created through XMLFormat.newInstance(java.lang.Class<? extends T>, javolution.xml.XMLFormat.InputElement)
and to setup from the specified XML element.XMLStreamExceptionpublic void write(Object obj, XMLFormat.OutputElement xml) throws XMLStreamException
XMLFormatwrite in class XMLFormat<Object>obj - the object to format.xml - the XMLElement destination.XMLStreamExceptionCopyright © 2005-2013 Javolution. All Rights Reserved.