Top Fields Constructors Methods
com.thoughtworks.xstream.io.xml

public Class JDom2Writer

extends AbstractDocumentWriter
Class Inheritance
Imports
com.thoughtworks.xstream.io.naming.NameCoder, org.jdom2.DefaultJDOMFactory, .Element, .JDOMFactory

Deprecated

as a consequence of AbstractDocumentWriter being deprecated. See corresponding docs for further information.

Since
1.4.5

Field Summary

Modifier and TypeField and Description
private final JDOMFactory

Constructor Summary

AccessConstructor and Description
public
JDom2Writer(final Element container, final JDOMFactory factory, final NameCoder nameCoder)

public
JDom2Writer(final Element container, final JDOMFactory factory)

public
JDom2Writer(final JDOMFactory factory, final NameCoder nameCoder)

public
JDom2Writer(final JDOMFactory factory)

public
JDom2Writer(final Element container, final NameCoder nameCoder)

public
JDom2Writer(final Element container)

public

Method Summary

Modifier and TypeMethod and Description
public void
protected Object
createNode(final String
the node name
name
)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Create a node.
public void
setValue(final String text)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Write the value (text content) of the current node.
private Element
top()

Inherited from com.thoughtworks.xstream.io.xml.AbstractDocumentWriter:
closeendNodeendNodeInternallyflushgetCurrentgetTopLevelNodesstartNode

Field Detail

documentFactoryback to summary
private final JDOMFactory documentFactory

Constructor Detail

JDom2Writerback to summary
public JDom2Writer(final Element container, final JDOMFactory factory, final NameCoder nameCoder)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer(final Element container, final JDOMFactory factory)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer(final JDOMFactory factory, final NameCoder nameCoder)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer(final JDOMFactory factory)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer(final Element container, final NameCoder nameCoder)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer(final Element container)
Since
1.4.5
JDom2Writerback to summary
public JDom2Writer()
Since
1.4.5

Method Detail

addAttributeback to summary
public void addAttribute(final String key, final String value)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.addAttribute.

createNodeback to summary
protected Object createNode(final String name)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Doc from com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Create a node. The provided node name is not yet XML friendly. If getCurrent() returns null the node is a top level node.

Parameters
name:String

the node name

Returns:Object

the new node

setValueback to summary
public void setValue(final String text)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Write the value (text content) of the current node.

topback to summary
private Element top()
Since
1.4.5