com.sun.xml.stream.writers
Class XMLStreamWriterImpl.ElementStack

java.lang.Object
  extended by com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementStack
Enclosing class:
XMLStreamWriterImpl

protected class XMLStreamWriterImpl.ElementStack
extends java.lang.Object


Field Summary
protected  short fDepth
          The size of the stack.
protected  com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState[] fElements
          The stack data.
 
Constructor Summary
XMLStreamWriterImpl.ElementStack()
          Default constructor.
 
Method Summary
 void clear()
          Clears the stack without throwing away existing QName objects.
 boolean empty()
           
 com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState peek()
          This function is as a result of optimization done for endElement -- we dont need to set the value for every end element we encouter.
 com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState pop()
          Pops an element off of the stack by setting the values of the specified QName.
 com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState push(java.lang.String prefix, java.lang.String localpart, java.lang.String rawname, java.lang.String uri, boolean isEmpty)
           
 com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState push(com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState element)
          Pushes an element on the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fElements

protected com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState[] fElements
The stack data.


fDepth

protected short fDepth
The size of the stack.

Constructor Detail

XMLStreamWriterImpl.ElementStack

public XMLStreamWriterImpl.ElementStack()
Default constructor.

Method Detail

push

public com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState push(com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState element)
Pushes an element on the stack.

Note: The QName values are copied into the stack. In other words, the caller does not orphan the element to the stack. Also, the QName object returned is not orphaned to the caller. It should be considered read-only.

Parameters:
element - The element to push onto the stack.
Returns:
Returns the actual QName object that stores the

push

public com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState push(java.lang.String prefix,
                                                                        java.lang.String localpart,
                                                                        java.lang.String rawname,
                                                                        java.lang.String uri,
                                                                        boolean isEmpty)
Parameters:
prefix -
localpart -
rawname -
uri -
isEmpty -
Returns:

pop

public com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState pop()
Pops an element off of the stack by setting the values of the specified QName.

Note: The object returned is not orphaned to the caller. Therefore, the caller should consider the object to be read-only.


clear

public void clear()
Clears the stack without throwing away existing QName objects.


peek

public com.sun.xml.stream.writers.XMLStreamWriterImpl.ElementState peek()
This function is as a result of optimization done for endElement -- we dont need to set the value for every end element we encouter. For Well formedness checks we can have the same QName object that was pushed. the values will be set only if application need to know about the endElement -- neeraj.bajaj@sun.com


empty

public boolean empty()
Returns:


Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.