org.apache.shindig.protocol.conversion.xstream
Interface WriterStack

All Known Implementing Classes:
ThreadSafeWriterStack

public interface WriterStack

A writer stack is a simple stack that tracks the current location of the writer.


Method Summary
 String peek()
          Peek into the current location of the writer.
 NamespaceSet peekNamespace()
           
 String pop()
          Remove and return the current node name, making the parent node the active node name.
 void push(String name, NamespaceSet namespace)
          add a node name into the stack indicating that the writer has moved into a new child element.
 void reset()
          Reset the stack to its default state.
 int size()
           
 

Method Detail

peek

String peek()
Peek into the current location of the writer.

Returns:
the name of the current node.

peekNamespace

NamespaceSet peekNamespace()
Returns:
the current namespace.

reset

void reset()
Reset the stack to its default state.


push

void push(String name,
          NamespaceSet namespace)
add a node name into the stack indicating that the writer has moved into a new child element.

Parameters:
name - the name of the new child element.
namespace - the namespace set associated with the current element.

pop

String pop()
Remove and return the current node name, making the parent node the active node name.

Returns:
the node name just removed from the stack.

size

int size()
Returns:
the size of the statck


Copyright © 2007-2012. All Rights Reserved.