|
GXPARSE hosted by |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.gorman.xml.parse.toolkit.AbstractElement
ca.gorman.xml.parse.toolkit.CoroutineElement<T>
public class CoroutineElement<T extends Parser>
Invokes
element handler
from the parser thread to run in the application thread.
| Constructor Summary | |
|---|---|
CoroutineElement(QName qName,
Attribute[] attribute)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getDocumentLevel()
Get the nesting level of this element. |
void |
parseContent()
Parse the content of an element (required even if there is no content). |
void |
run()
Execute a callback from the parser thread to run the element handler
in the application thread. |
void |
skipContent()
Unsupported operation, override this method to implement the ability to skip the content of an element. |
| Methods inherited from class ca.gorman.xml.parse.toolkit.AbstractElement |
|---|
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent, newInstance, setAttribute, setAttributes, setParent, setQName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ca.gorman.xml.parse.Element |
|---|
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent |
| Constructor Detail |
|---|
public CoroutineElement(QName qName,
Attribute[] attribute)
Constructor.
qName - name of element, not nullattribute - zero or more attributes of element, not null
NullPointerException - if any parameter is null| Method Detail |
|---|
public final void run()
Execute a callback from the parser thread to run the
element handler
in the application thread.
This method is invoked just before the parser starts parsing the actual
DTD, and runs until the parser reaches the end of the DTD.
The parser is suspended until the element handler invokes the
parseContent method.
run in interface RunnableCoroutineTransferException - if the element handler throws an
exception.
public final void parseContent()
throws ListenerException,
IOException
CurrentElementParse the content of an element (required even if there is no content).
This method causes the parser to continue operation, and does not return until the end of the element.
parseContent in interface CurrentElementListenerException
IOException
public void skipContent()
throws ListenerException,
IOException
Unsupported operation, override this method to implement the ability to skip the content of an element.
skipContent in interface CurrentElementUnsupportedOperationException - when invoked
ListenerException
IOExceptionpublic final int getDocumentLevel()
CurrentElementGet the nesting level of this element.
Top element (the document element) is level 1, child elements have higher numbers.
getDocumentLevel in interface CurrentElement
|
GXPARSE download | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||