ElementStack is used internally inside the SAXContentHandler to maintain a stack of Elementinstances. It opens
an integration possibility allowing derivations to prune the tree when a node
is complete.
| Modifier and Type | Field and Description |
|---|---|
| private DispatchHandler | |
| protected int | lastElementIndex
index of the item at the top of the stack or -1 if the stack is empty |
| protected Element[] | stack
stack of |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHandler(String
is the path to be handled path, ElementHandler is the elementHandler)ElementHandler to be called by the event
based processor.Implements org. ElementHandler to be called when the specified
path is encounted.
|
| public void | |
| public boolean | Returns: true when anElementHandler is registered for the
specified path.DOCUMENT ME! path)DOCUMENT ME! |
| public Element | |
| public DispatchHandler | |
| public Element | |
| private String | |
| public String | |
| public Element | Returns: the current element on the stackPeeks at the top element on the stack without changing the contents of the stack. |
| public Element | Returns: the element that has just been popped off the stackPops the element off the stack |
| public void | |
| protected void | |
| public void | removeHandler(String
is the path to remove the path)ElementHandler for.Implements org. ElementHandler from the event based processor,
for the specified path.
|
| public void | |
| public int |
| handler | back to summary |
|---|---|
| private DispatchHandler handler | |
| lastElementIndex | back to summary |
|---|---|
| protected int lastElementIndex index of the item at the top of the stack or -1 if the stack is empty | |
| stack | back to summary |
|---|---|
| protected Element[] stack stack of | |
| ElementStack | back to summary |
|---|---|
| public ElementStack() | |
| ElementStack | back to summary |
|---|---|
| public ElementStack(int defaultCapacity) | |
| addHandler | back to summary |
|---|---|
| public void addHandler(String path, ElementHandler elementHandler) Implements org. Doc from org. Adds the
| |
| clear | back to summary |
|---|---|
| public void clear() Peeks at the top element on the stack without changing the contents of the stack. | |
| containsHandler | back to summary |
|---|---|
| public boolean containsHandler(String path) DOCUMENT ME!
| |
| getCurrent | back to summary |
|---|---|
| public Element getCurrent() Implements org. Doc from org. DOCUMENT ME!
| |
| getDispatchHandler | back to summary |
|---|---|
| public DispatchHandler getDispatchHandler() | |
| getElement | back to summary |
|---|---|
| public Element getElement(int depth) Implements org. Doc from org. DOCUMENT ME!
| |
| getHandlerPath | back to summary |
|---|---|
| private String getHandlerPath(String path) | |
| getPath | back to summary |
|---|---|
| public String getPath() Implements org. Doc from org. DOCUMENT ME!
| |
| peekElement | back to summary |
|---|---|
| public Element peekElement() Peeks at the top element on the stack without changing the contents of the stack.
| |
| popElement | back to summary |
|---|---|
| public Element popElement() Pops the element off the stack
| |
| pushElement | back to summary |
|---|---|
| public void pushElement(Element element) Pushes a new element onto the stack
| |
| reallocate | back to summary |
|---|---|
| protected void reallocate(int size) Reallocates the stack to the given size
| |
| removeHandler | back to summary |
|---|---|
| public void removeHandler(String path) Implements org. Doc from org. Removes the
| |
| setDispatchHandler | back to summary |
|---|---|
| public void setDispatchHandler(DispatchHandler dispatchHandler) | |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. DOCUMENT ME!
| |