public class StackWriterWrapper
extends com.thoughtworks.xstream.io.WriterWrapper
| Constructor and Description |
|---|
StackWriterWrapper(com.thoughtworks.xstream.io.HierarchicalStreamWriter wrapped,
WriterStack writerStack,
Map<String,NamespaceSet> namespaces)
Create a
StackWriterWrapper that wraps a
HierarchicalStreamWriter and tracks where that writer is in the
hierarchy. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Set attribute values on the current node, but filter out class attributes
from the writer, this is not strictly a feature of this class, but is
required (for shindig to meet the XSD requirements.
|
void |
endNode()
End the current node, making the parent node the active node.
|
void |
startNode(String name)
Begin a new element or node of the supplied name.
|
void |
startNode(String name,
Class clazz)
Start a node with a specific class.
|
public StackWriterWrapper(com.thoughtworks.xstream.io.HierarchicalStreamWriter wrapped,
WriterStack writerStack,
Map<String,NamespaceSet> namespaces)
StackWriterWrapper that wraps a
HierarchicalStreamWriter and tracks where that writer is in the
hierarchy.wrapped - the underlying writerwriterStack - the stack that will record where the writer is.namespaces - public void addAttribute(String name, String value)
addAttribute in interface com.thoughtworks.xstream.io.HierarchicalStreamWriteraddAttribute in class com.thoughtworks.xstream.io.WriterWrappername - the name of attributevalue - the value of the attribute.WriterWrapper.addAttribute(java.lang.String,
java.lang.String)public void startNode(String name)
startNode in interface com.thoughtworks.xstream.io.HierarchicalStreamWriterstartNode in class com.thoughtworks.xstream.io.WriterWrappername - the name of the node.WriterWrapper.startNode(java.lang.String )public void startNode(String name, Class clazz)
startNode(String) so we might have double
recording of the position in the stack. This would be a bug.startNode in interface com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriterstartNode in class com.thoughtworks.xstream.io.WriterWrapperWriterWrapper.startNode(java.lang.String ,
java.lang.Class)public void endNode()
endNode in interface com.thoughtworks.xstream.io.HierarchicalStreamWriterendNode in class com.thoughtworks.xstream.io.WriterWrapperWriterWrapper.endNode()Copyright © 2007-2012. All Rights Reserved.