cz.cuni.jagrlib.xml
Class JGLScript.ParseState

java.lang.Object
  extended by cz.cuni.jagrlib.xml.JGLScript.ParseState
Direct Known Subclasses:
JGLScript.ArgParseState, JGLScript.InitState, JGLScript.MemberState, JGLScript.NullState, JGLScript.ObjectState, JGLScript.ScriptState, JGLScript.SequenceState, JGLScript.TextParseState
Enclosing class:
JGLScript

protected abstract class JGLScript.ParseState
extends java.lang.Object

Generic state object.


Field Summary
 java.lang.String context
          Context identification (for debugging & error messages only, may be null).
protected  JGLScript.ParseState parent
          Pointer to ancestor (FIFO).
 
Constructor Summary
JGLScript.ParseState()
          Pushes new parsing state on the stack.
 
Method Summary
 void endElement(java.lang.String qName)
          My element was finished.
 void characters(char[] ch, int start, int length)
          Swallows internal characters.
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object[] args)
          Invokes the given method of the class instance.
 void newInstance(java.lang.Object[] args)
          Checks whether the class instance was already created, if not, creates it using the given constructor.
 void pop()
          Pops this state from the stack.
 void setText(int type, java.lang.String value)
          Text from one of descendants..
 void setValue(int type, java.lang.Object value)
          Arbitrary value from one of descendants..
 void startElement(java.lang.String qName, org.xml.sax.Attributes atts)
          A new XML element is starting in my context..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

public java.lang.String context
Context identification (for debugging & error messages only, may be null).


parent

protected JGLScript.ParseState parent
Pointer to ancestor (FIFO).

Constructor Detail

JGLScript.ParseState

public JGLScript.ParseState()
Pushes new parsing state on the stack.

Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
Swallows internal characters.


startElement

public void startElement(java.lang.String qName,
                         org.xml.sax.Attributes atts)
A new XML element is starting in my context..


endElement

public void endElement(java.lang.String qName)
My element was finished.


setText

public void setText(int type,
                    java.lang.String value)
Text from one of descendants..


setValue

public void setValue(int type,
                     java.lang.Object value)
Arbitrary value from one of descendants..


newInstance

public void newInstance(java.lang.Object[] args)
Checks whether the class instance was already created, if not, creates it using the given constructor.


invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object[] args)
Invokes the given method of the class instance.


pop

public void pop()
         throws org.xml.sax.SAXException
Pops this state from the stack.

Throws:
org.xml.sax.SAXException