Class JDom2Writer
java.lang.Object
com.thoughtworks.xstream.io.AbstractWriter
com.thoughtworks.xstream.io.xml.AbstractXmlWriter
com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
com.thoughtworks.xstream.io.xml.JDom2Writer
- All Implemented Interfaces:
ExtendedHierarchicalStreamWriter, HierarchicalStreamWriter, DocumentWriter, XmlFriendlyWriter
- Since:
- 1.4.5
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJDom2Writer(org.jdom2.Element container) JDom2Writer(org.jdom2.Element container, NameCoder nameCoder) JDom2Writer(org.jdom2.Element container, org.jdom2.JDOMFactory factory) JDom2Writer(org.jdom2.Element container, org.jdom2.JDOMFactory factory, NameCoder nameCoder) JDom2Writer(org.jdom2.JDOMFactory factory) JDom2Writer(org.jdom2.JDOMFactory factory, NameCoder nameCoder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String key, String value) protected ObjectcreateNode(String name) Create a node.voidWrite the value (text content) of the current node.private org.jdom2.Elementtop()Methods inherited from class AbstractDocumentWriter
close, endNode, endNodeInternally, flush, getCurrent, getTopLevelNodes, startNodeMethods inherited from class AbstractXmlWriter
escapeXmlNameMethods inherited from class AbstractWriter
encodeAttribute, encodeNode, startNode, underlyingWriterMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HierarchicalStreamWriter
underlyingWriter
-
Field Details
-
documentFactory
private final org.jdom2.JDOMFactory documentFactory
-
-
Constructor Details
-
JDom2Writer
- Since:
- 1.4.5
-
JDom2Writer
public JDom2Writer(org.jdom2.Element container, org.jdom2.JDOMFactory factory) - Since:
- 1.4.5
-
JDom2Writer
- Since:
- 1.4.5
-
JDom2Writer
public JDom2Writer(org.jdom2.JDOMFactory factory) - Since:
- 1.4.5
-
JDom2Writer
- Since:
- 1.4.5
-
JDom2Writer
public JDom2Writer(org.jdom2.Element container) - Since:
- 1.4.5
-
JDom2Writer
public JDom2Writer()- Since:
- 1.4.5
-
-
Method Details
-
createNode
Description copied from class:AbstractDocumentWriterCreate a node. The provided node name is not yet XML friendly. IfAbstractDocumentWriter.getCurrent()returnsnullthe node is a top level node.- Specified by:
createNodein classAbstractDocumentWriter- Parameters:
name- the node name- Returns:
- the new node
-
setValue
Description copied from interface:HierarchicalStreamWriterWrite the value (text content) of the current node. -
addAttribute
-
top
private org.jdom2.Element top()- Since:
- 1.4.5
-