|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.serializer.ElemContext
final class ElemContext
This class is a stack frame that consists of information about the element currently being processed by a serializer. Consider this example:
A stack frame will be pushed for "A" at depth 1, then another one for "B1" at depth 2. Then "B1" stackframe is popped. When the stack frame for "B2" is pushed, this implementation re-uses the old stack fram object used by "B1" to be efficient at not creating too many of these object. This is by no means a public class, and neither are its fields or methods, they are all helper fields for a serializer. The purpose of this class is to be more consistent with pushing information when a new element is being serialized and more quickly restoring the old information about the parent element with a simple pop() when the child element is done. Previously there was some redundant and error-prone calculations going on to retore information.
Field Summary | |
---|---|
(package private) int |
m_currentElemDepth
The nesting depth of the element inside other elements. |
(package private) ElemDesc |
m_elementDesc
HTML field, the element description of the HTML element |
(package private) java.lang.String |
m_elementLocalName
The local name of the element. |
(package private) java.lang.String |
m_elementName
The fully qualified name of the element (with prefix, if any). |
(package private) java.lang.String |
m_elementURI
The URI of the element. |
(package private) boolean |
m_isCdataSection
If the element is in the cdata-section-names list then the value is true. |
(package private) boolean |
m_isRaw
True if the current element has output escaping disabled. |
private ElemContext |
m_next
The next element "stack frame". |
(package private) ElemContext |
m_prev
The previous element "stack frame". |
(package private) boolean |
m_startTagOpen
Set to true when a start tag is started, or open, but not all the attributes or namespace information is yet collected. |
Constructor Summary | |
---|---|
(package private) |
ElemContext()
Constructor to create the root of the element contexts. |
private |
ElemContext(ElemContext previous)
Constructor to create the "stack frame" for a given element depth. |
Method Summary | |
---|---|
(package private) ElemContext |
pop()
Pop the current "stack frame". |
(package private) ElemContext |
push()
This method pushes an element "stack frame" but with no initialization of values in that frame. |
(package private) ElemContext |
push(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Push an element context on the stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final int m_currentElemDepth
ElemDesc m_elementDesc
java.lang.String m_elementLocalName
java.lang.String m_elementName
java.lang.String m_elementURI
boolean m_isCdataSection
boolean m_isRaw
private ElemContext m_next
final ElemContext m_prev
boolean m_startTagOpen
Constructor Detail |
---|
ElemContext()
private ElemContext(ElemContext previous)
previous
- The "stack frame" corresponding to the new
elements parent element.Method Detail |
---|
final ElemContext pop()
final ElemContext push()
final ElemContext push(java.lang.String uri, java.lang.String localName, java.lang.String qName)
uri
- The URI for the namespace for the element name,
can be null if it is not yet known.localName
- The local name of the element (no prefix),
can be null.qName
- The qualified name (with prefix, if any)
of the element, this parameter is required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |