|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--java.util.Stack | +--org.apache.xpath.VariableStack
**For internal use only** Defines a class to keep track of a stack for template arguments and variables, since we can't simply bind the variables to templates and walk the preceding children and ancestors. The stack is delimited by context markers which bound call frames, and which you can't search past for a variable, and by element frames, which are Arg objects with the given ElemTemplateElement instead of a qname. You can search past element frames, and they accumulate until they are popped. Note: Someone recently made the suggestion that the globals should not be kept at the bottom of the stack, but should be implemented in a hash table.
Constructor Summary | |
VariableStack()
**For internal use only** Constructor for a variable stack. |
Method Summary | |
int |
getCurrentStackFrameIndex()
**For internal use only** Get the top of the stack frame from where a search for a variable or param should take place. |
XObject |
getParamVariable(QName qname)
**For internal use only** Same as getVariable, except don't look in the global space. |
java.lang.Object |
getVariable(QName name)
**For internal use only** Given a name, return a string representing the value. |
void |
markGlobalStackFrame()
**For internal use only** Mark the top of the global stack frame. |
java.lang.Object |
pop()
**For internal use only** Override the pop in order to track the m_currentStackFrameIndex correctly. |
void |
popCurrentContext()
**For internal use only** Pop the current context from the current context stack. |
void |
popElemFrame()
**For internal use only** Pop the current context from the current context stack. |
java.lang.Object |
push(java.lang.Object o)
**For internal use only** Override the push in order to track the m_currentStackFrameIndex correctly. |
void |
pushContextMarker()
**For internal use only** |
void |
pushElemFrame()
**For internal use only** Push an argument onto the stack. |
void |
pushVariable(QName qname,
XObject val)
**For internal use only** Push an argument onto the stack. |
void |
setCurrentStackFrameIndex(int currentStackFrameIndex)
**For internal use only** Set the top of the stack frame from where a search for a variable or param should take place. |
void |
setStackSize(int sz)
**For internal use only** Override the setSize in order to track the m_currentStackFrameIndex correctly. |
Methods inherited from class java.util.Stack |
empty,
peek,
search |
Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public VariableStack()
Method Detail |
public void markGlobalStackFrame()
public void setCurrentStackFrameIndex(int currentStackFrameIndex)
public int getCurrentStackFrameIndex()
public void pushContextMarker()
public java.lang.Object push(java.lang.Object o)
public java.lang.Object pop()
public void setStackSize(int sz)
public void popCurrentContext()
public void pushVariable(QName qname, XObject val)
public XObject getParamVariable(QName qname) throws SAXException
public java.lang.Object getVariable(QName name) throws SAXException
public void pushElemFrame()
public void popElemFrame()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |