This has been changed from the previous incarnations of this class to be fairly low level.
| Modifier and Type | Field and Description |
|---|---|
| private int | _currentFrameBottom
The bottom index of the current frame (relative to |
| pack-priv int | _frameTop
The top of the stack frame ( |
| pack-priv int[] | _links
The stack of frame positions. |
| pack-priv int | _linksTop
The top of the links stack. |
| pack-priv XObject[] | _stackFrames
The stack frame where all variables and params will be kept. |
| public static final int | CLEARLIMITATION
limitation for 1K |
| private static XObject[] | m_nulls
NEEDSDOC Field m_nulls |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearLocalSlots(int
The start position, relative to the current local stack frame. start, int The number of slots to be cleared. len)Use this to clear the variables in a section of the stack. |
| public synchronized Object | Returns: a clone of this variable stack.Overrides java. Returns a clone of this variable stack. |
| public XObject | Returns: The item at the given index.index from zero. i)Get the element at the given index, regardless of stackframe. |
| public XObject | Returns: The value of the variable.The XPath context, which must be passed in order to
lazy evaluate variables. xctxt, final int Global variable index relative to the global stack
frame bottom. index)Get a global variable or parameter from the global stack frame. |
| public XObject | Returns: The value of the variable.The XPath context, which must be passed in order to
lazy evaluate variables. xctxt, final int Global variable index relative to the global stack
frame bottom. index, boolean destructiveOK)Get a global variable or parameter from the global stack frame. |
| public XObject | Returns: The value of the variable.The XPath context, which must be passed in order to
lazy evaluate variables. xctxt, int Local variable index relative to the current stack
frame bottom. index)Get a local variable or parameter in the current stack frame. |
| public XObject | Returns: The value of the variable.Local variable index relative to the given
frame bottom.
NEEDSDOC @param frame index, int frame)Get a local variable or parameter in the current stack frame. |
| public XObject | Returns: The value of the variable.The XPath context, which must be passed in order to
lazy evaluate variables. xctxt, int Local variable index relative to the current stack
frame bottom. index, boolean destructiveOK)Get a local variable or parameter in the current stack frame. |
| public int | Returns: The current stack frame position.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. |
| public XObject | Returns: The evaluated value of the variable.The XPath context, which must be passed in order to
lazy evaluate variables. xctxt, QName The qualified name of the variable. qname)Get a variable based on it's qualified name. |
| public boolean | Returns: true if the value at the index is not null.Local variable index relative to the current stack
frame bottom. index)Tell if a local variable has been set or not. |
| public int | Returns: The bottom of the stack frame, from where local variable addressing should start from.The size of the stack frame allocation. This ammount should
normally be the maximum number of variables that you can have allocated
at one time in the new stack frame. size)Allocates memory (called a stackframe) on the stack; used to store local variables and parameter arguments. |
| public void | |
| public void | setGlobalVariable(final int
Local variable index relative to the global stack frame
bottom. index, final XObject The value of the variable that is being set. val)Set a global variable or parameter in the global stack frame. |
| public void | setLocalVariable(int
Local variable index relative to the current stack
frame bottom. index, XObject The value of the variable that is being set. val)Set a local variable or parameter in the current stack frame. |
| public void | setLocalVariable(int
Local variable index relative to the current stack
frame bottom.
NEEDSDOC @param stackFrame index, XObject The value of the variable that is being set. val, int stackFrame)Set a local variable or parameter in the specified stack frame. |
| public void | |
| public int | |
| public void | |
| public void | unlink(int
The current frame to set to
after the unlink. currentFrame)Free up the stack frame that was last allocated with
|
| _currentFrameBottom | back to summary |
|---|---|
| private int _currentFrameBottom The bottom index of the current frame (relative to | |
| _frameTop | back to summary |
|---|---|
| pack-priv int _frameTop The top of the stack frame ( | |
| _links | back to summary |
|---|---|
| pack-priv int[] _links The stack of frame positions. I call 'em links because of distant Motorola 68000 assembler memories. :-) | |
| _linksTop | back to summary |
|---|---|
| pack-priv int _linksTop The top of the links stack. | |
| _stackFrames | back to summary |
|---|---|
| pack-priv XObject[] _stackFrames The stack frame where all variables and params will be kept. | |
| CLEARLIMITATION | back to summary |
|---|---|
| public static final int CLEARLIMITATION limitation for 1K | |
| m_nulls | back to summary |
|---|---|
| private static XObject[] m_nulls NEEDSDOC Field m_nulls | |
| VariableStack | back to summary |
|---|---|
| public VariableStack() Constructor for a variable stack. | |
| clearLocalSlots | back to summary |
|---|---|
| public void clearLocalSlots(int start, int len) Use this to clear the variables in a section of the stack. This is used to clear the parameter section of the stack, so that default param values can tell if they've already been set. It is important to note that this function has a 1K limitation.
| |
| clone | back to summary |
|---|---|
| public synchronized Object clone() throws CloneNotSupportedException Overrides java. Returns a clone of this variable stack.
| |
| elementAt | back to summary |
|---|---|
| public XObject elementAt(final int i) Get the element at the given index, regardless of stackframe.
| |
| getGlobalVariable | back to summary |
|---|---|
| public XObject getGlobalVariable(XPathContext xctxt, final int index) throws TransformerException Get a global variable or parameter from the global stack frame.
| |
| getGlobalVariable | back to summary |
|---|---|
| public XObject getGlobalVariable(XPathContext xctxt, final int index, boolean destructiveOK) throws TransformerException Get a global variable or parameter from the global stack frame.
| |
| getLocalVariable | back to summary |
|---|---|
| public XObject getLocalVariable(XPathContext xctxt, int index) throws TransformerException Get a local variable or parameter in the current stack frame.
| |
| getLocalVariable | back to summary |
|---|---|
| public XObject getLocalVariable(int index, int frame) throws TransformerException Get a local variable or parameter in the current stack frame.
| |
| getLocalVariable | back to summary |
|---|---|
| public XObject getLocalVariable(XPathContext xctxt, int index, boolean destructiveOK) throws TransformerException Get a local variable or parameter in the current stack frame.
| |
| getStackFrame | back to summary |
|---|---|
| public int getStackFrame() 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.
| |
| getVariableOrParam | back to summary |
|---|---|
| public XObject getVariableOrParam(XPathContext xctxt, QName qname) throws TransformerException Get a variable based on it's qualified name. This is for external use only.
| |
| isLocalSet | back to summary |
|---|---|
| public boolean isLocalSet(int index) throws TransformerException Tell if a local variable has been set or not.
| |
| link | back to summary |
|---|---|
| public int link(final int size) Allocates memory (called a stackframe) on the stack; used to store local variables and parameter arguments. I use the link/unlink concept because of distant Motorola 68000 assembler memories.
| |
| reset | back to summary |
|---|---|
| public void reset() Reset the stack to a start position.
| |
| setGlobalVariable | back to summary |
|---|---|
| public void setGlobalVariable(final int index, final XObject val) Set a global variable or parameter in the global stack frame.
| |
| setLocalVariable | back to summary |
|---|---|
| public void setLocalVariable(int index, XObject val) Set a local variable or parameter in the current stack frame.
| |
| setLocalVariable | back to summary |
|---|---|
| public void setLocalVariable(int index, XObject val, int stackFrame) Set a local variable or parameter in the specified stack frame.
| |
| setStackFrame | back to summary |
|---|---|
| public void setStackFrame(int sf) Set the current stack frame.
| |
| size | back to summary |
|---|---|
| public int size() Get size of the stack.
| |
| unlink | back to summary |
|---|---|
| public void unlink() Free up the stack frame that was last allocated with
| |
| unlink | back to summary |
|---|---|
| public void unlink(int currentFrame) Free up the stack frame that was last allocated with
| |