|
BEA Systems, Inc. | ||||||||||
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 | +--weblogic.apache.xpath.VariableStack
Defines a class to keep track of a stack for template arguments and variables. The VariableStack extends Stack, and each element in the stack is a stack frame, i.e. a Stack itself. The zero element is the global stack frame. 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.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
VariableStack()
Constructor for a variable stack. |
Method Summary | |
int |
getContextPos()
Get the current context position. |
Arg |
getDeclaredVariable(QName qname)
Returns a variable or parameter that is already declared, either in the current context or in the global space. |
Arg |
getParamArg(QName qname)
Get the variable argument. |
int |
getSearchStart()
Get the position to start the search, or -1 if the search should start from the top. |
int |
getSearchStartOrTop()
Get the position from where the search should start, which is either the searchStart property, or the top of the stack if that value is -1. |
XObject |
getVariable(XPathContext xctxt,
QName name)
Given a name, return an object representing the value. |
void |
markGlobalStackFrame()
Mark the top of the global stack frame. |
void |
popContextPosition()
Pop the current context position onto the contextPositions. |
void |
popCurrentContext()
Pop the current context from the current context stack. |
void |
popElemFrame()
Pop the current context from the current context stack. |
void |
pushContextMarker()
Push the current top of the stack as a context marker into the variables stack to let us know when to stop searching for a var. |
void |
pushContextPosition(int pos)
Push a context marker onto the contextPositions stack to let us know when to stop searching for a var. |
void |
pushElemFrame()
Push an argument onto the stack. |
void |
pushOrReplaceParameter(QName qname,
XObject xval)
Push a parameter onto the stack, or replace it if it already exists. |
void |
pushVariable(QName qname,
XObject val)
Push an argument onto the stack. |
void |
pushVariableArg(Arg arg)
Push an argument onto the stack. |
void |
remarkParams()
Re-mark the variables in the current frame as all being parameters. |
void |
setSearchStart(int startPos)
Set where to start the current search for a variable. |
Methods inherited from class java.util.Stack |
empty,
peek,
pop,
push,
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,
removeRange,
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 |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public VariableStack()
Method Detail |
public void setSearchStart(int startPos)
startPos
- The position to start the search, or -1
if the search should start from the top.public int getSearchStartOrTop()
public int getSearchStart()
public void markGlobalStackFrame()
public void pushContextPosition(int pos)
public void popContextPosition()
public int getContextPos()
public void pushContextMarker()
public void popCurrentContext()
public void pushOrReplaceParameter(QName qname, XObject xval)
qname
- The qualified name of the variable.val
- The wrapped value of the variable.public void remarkParams()
public void pushVariable(QName qname, XObject val)
qname
- The qualified name of the variable.val
- The wrapped value of the variable.public void pushVariableArg(Arg arg)
arg
- The variable argument.public Arg getDeclaredVariable(QName qname) throws javax.xml.transform.TransformerException
qname
- The qualified name of the variable.null
.public Arg getParamArg(QName qname) throws javax.xml.transform.TransformerException
qname
- The qualified name of the variable.public XObject getVariable(XPathContext xctxt, QName name) throws javax.xml.transform.TransformerException
qname
- The qualified name of the variable.public void pushElemFrame()
public void popElemFrame()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |