blob: 986bbc485fa83e2a777eff2123d7990406f1f3bb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:58 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Class VariableStack
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VariableStack.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xpath/SourceTreeManager.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xpath/XPath.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VariableStack.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xpath</FONT>
<BR>
Class VariableStack</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.xpath.VariableStack</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../org/apache/xpath/jaxp/JAXPVariableStack.html">JAXPVariableStack</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>VariableStack</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable</DL>
<P>
Defines a class to keep track of a stack for
template arguments and variables.
<p>This has been changed from the previous incarnations of this
class to be fairly low level.</p>
<P>
<DL>
<DT><B>Usage:</B><DD><i><font size="-1" color="#FF0000"> **For internal use only**</font></i></DD>
</DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#CLEARLIMITATION">CLEARLIMITATION</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limitation for 1K</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#VariableStack()">VariableStack</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for a variable stack.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#VariableStack(int)">VariableStack</A></B>(int&nbsp;initStackSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for a variable stack.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#clearLocalSlots(int, int)">clearLocalSlots</A></B>(int&nbsp;start,
int&nbsp;len)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use this to clear the variables in a section of the stack.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#clone()">clone</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a clone of this variable stack.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#elementAt(int)">elementAt</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the element at the given index, regardless of stackframe.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getGlobalVariable(org.apache.xpath.XPathContext, int)">getGlobalVariable</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a global variable or parameter from the global stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getGlobalVariable(org.apache.xpath.XPathContext, int, boolean)">getGlobalVariable</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index,
boolean&nbsp;destructiveOK)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a global variable or parameter from the global stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getLocalVariable(int, int)">getLocalVariable</A></B>(int&nbsp;index,
int&nbsp;frame)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a local variable or parameter in the current stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getLocalVariable(org.apache.xpath.XPathContext, int)">getLocalVariable</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a local variable or parameter in the current stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getLocalVariable(org.apache.xpath.XPathContext, int, boolean)">getLocalVariable</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index,
boolean&nbsp;destructiveOK)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a local variable or parameter in the current stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getStackFrame()">getStackFrame</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#getVariableOrParam(org.apache.xpath.XPathContext, org.apache.xml.utils.QName)">getVariableOrParam</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
<A HREF="../../../org/apache/xml/utils/QName.html">QName</A>&nbsp;qname)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a variable based on it's qualified name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#isLocalSet(int)">isLocalSet</A></B>(int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tell if a local variable has been set or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#link(int)">link</A></B>(int&nbsp;size)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allocates memory (called a stackframe) on the stack; used to store
local variables and parameter arguments.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#reset()">reset</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the stack to a start position.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#setGlobalVariable(int, org.apache.xpath.objects.XObject)">setGlobalVariable</A></B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a global variable or parameter in the global stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#setLocalVariable(int, org.apache.xpath.objects.XObject)">setLocalVariable</A></B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a local variable or parameter in the current stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#setLocalVariable(int, org.apache.xpath.objects.XObject, int)">setLocalVariable</A></B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val,
int&nbsp;stackFrame)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a local variable or parameter in the specified stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#setStackFrame(int)">setStackFrame</A></B>(int&nbsp;sf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the current stack frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#size()">size</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get size of the stack.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#unlink()">unlink</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Free up the stack frame that was last allocated with
<A HREF="../../../org/apache/xpath/VariableStack.html#link(int)"><CODE>link(int size)</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/VariableStack.html#unlink(int)">unlink</A></B>(int&nbsp;currentFrame)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Free up the stack frame that was last allocated with
<A HREF="../../../org/apache/xpath/VariableStack.html#link(int)"><CODE>link(int size)</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="CLEARLIMITATION"><!-- --></A><H3>
CLEARLIMITATION</H3>
<PRE>
public static final int <B>CLEARLIMITATION</B></PRE>
<DL>
<DD>limitation for 1K</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="VariableStack()"><!-- --></A><H3>
VariableStack</H3>
<PRE>
public <B>VariableStack</B>()</PRE>
<DL>
<DD>Constructor for a variable stack.</DL>
<HR>
<A NAME="VariableStack(int)"><!-- --></A><H3>
VariableStack</H3>
<PRE>
public <B>VariableStack</B>(int&nbsp;initStackSize)</PRE>
<DL>
<DD>Constructor for a variable stack.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>initStackSize</CODE> - The initial stack size. Must be at least one. The
stack can grow if needed.</DL>
</DD>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
public java.lang.Object <B>clone</B>()
throws java.lang.CloneNotSupportedException</PRE>
<DL>
<DD>Returns a clone of this variable stack.<DD><DL>
<DT><B>Returns:</B><DD>a clone of this variable stack.<DT><B>Throws:</B><DD>java.lang.CloneNotSupportedException - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="elementAt(int)"><!-- --></A><H3>
elementAt</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>elementAt</B>(int&nbsp;i)</PRE>
<DL>
<DD>Get the element at the given index, regardless of stackframe.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - index from zero.<DT><B>Returns:</B><DD>The item at the given index.</DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Get size of the stack.<DD><DL>
<DT><B>Returns:</B><DD>the total size of the execution stack.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD>Reset the stack to a start position.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setStackFrame(int)"><!-- --></A><H3>
setStackFrame</H3>
<PRE>
public void <B>setStackFrame</B>(int&nbsp;sf)</PRE>
<DL>
<DD>Set the current stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sf</CODE> - The new stack frame position.</DL>
</DD>
</DL>
<HR>
<A NAME="getStackFrame()"><!-- --></A><H3>
getStackFrame</H3>
<PRE>
public int <B>getStackFrame</B>()</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>Returns:</B><DD>The current stack frame position.</DL>
</DD>
</DL>
<HR>
<A NAME="link(int)"><!-- --></A><H3>
link</H3>
<PRE>
public int <B>link</B>(int&nbsp;size)</PRE>
<DL>
<DD>Allocates memory (called a stackframe) on the stack; used to store
local variables and parameter arguments.
<p>I use the link/unlink concept because of distant
<a href="http://math.millikin.edu/mprogers/Courses/currentCourses/CS481-ComputerArchitecture/cs481.Motorola68000.html">
Motorola 68000 assembler</a> memories.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - 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.<DT><B>Returns:</B><DD>The bottom of the stack frame, from where local variable addressing
should start from.</DL>
</DD>
</DL>
<HR>
<A NAME="unlink()"><!-- --></A><H3>
unlink</H3>
<PRE>
public void <B>unlink</B>()</PRE>
<DL>
<DD>Free up the stack frame that was last allocated with
<A HREF="../../../org/apache/xpath/VariableStack.html#link(int)"><CODE>link(int size)</CODE></A>.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="unlink(int)"><!-- --></A><H3>
unlink</H3>
<PRE>
public void <B>unlink</B>(int&nbsp;currentFrame)</PRE>
<DL>
<DD>Free up the stack frame that was last allocated with
<A HREF="../../../org/apache/xpath/VariableStack.html#link(int)"><CODE>link(int size)</CODE></A>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>currentFrame</CODE> - The current frame to set to
after the unlink.</DL>
</DD>
</DL>
<HR>
<A NAME="setLocalVariable(int, org.apache.xpath.objects.XObject)"><!-- --></A><H3>
setLocalVariable</H3>
<PRE>
public void <B>setLocalVariable</B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val)</PRE>
<DL>
<DD>Set a local variable or parameter in the current stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Local variable index relative to the current stack
frame bottom.<DD><CODE>val</CODE> - The value of the variable that is being set.</DL>
</DD>
</DL>
<HR>
<A NAME="setLocalVariable(int, org.apache.xpath.objects.XObject, int)"><!-- --></A><H3>
setLocalVariable</H3>
<PRE>
public void <B>setLocalVariable</B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val,
int&nbsp;stackFrame)</PRE>
<DL>
<DD>Set a local variable or parameter in the specified stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Local variable index relative to the current stack
frame bottom.
NEEDSDOC @param stackFrame<DD><CODE>val</CODE> - The value of the variable that is being set.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalVariable(org.apache.xpath.XPathContext, int)"><!-- --></A><H3>
getLocalVariable</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getLocalVariable</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a local variable or parameter in the current stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath context, which must be passed in order to
lazy evaluate variables.<DD><CODE>index</CODE> - Local variable index relative to the current stack
frame bottom.<DT><B>Returns:</B><DD>The value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalVariable(int, int)"><!-- --></A><H3>
getLocalVariable</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getLocalVariable</B>(int&nbsp;index,
int&nbsp;frame)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a local variable or parameter in the current stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Local variable index relative to the given
frame bottom.
NEEDSDOC @param frame<DT><B>Returns:</B><DD>The value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalVariable(org.apache.xpath.XPathContext, int, boolean)"><!-- --></A><H3>
getLocalVariable</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getLocalVariable</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index,
boolean&nbsp;destructiveOK)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a local variable or parameter in the current stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath context, which must be passed in order to
lazy evaluate variables.<DD><CODE>index</CODE> - Local variable index relative to the current stack
frame bottom.<DT><B>Returns:</B><DD>The value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="isLocalSet(int)"><!-- --></A><H3>
isLocalSet</H3>
<PRE>
public boolean <B>isLocalSet</B>(int&nbsp;index)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Tell if a local variable has been set or not.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Local variable index relative to the current stack
frame bottom.<DT><B>Returns:</B><DD>true if the value at the index is not null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="clearLocalSlots(int, int)"><!-- --></A><H3>
clearLocalSlots</H3>
<PRE>
public void <B>clearLocalSlots</B>(int&nbsp;start,
int&nbsp;len)</PRE>
<DL>
<DD>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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>start</CODE> - The start position, relative to the current local stack frame.<DD><CODE>len</CODE> - The number of slots to be cleared.</DL>
</DD>
</DL>
<HR>
<A NAME="setGlobalVariable(int, org.apache.xpath.objects.XObject)"><!-- --></A><H3>
setGlobalVariable</H3>
<PRE>
public void <B>setGlobalVariable</B>(int&nbsp;index,
<A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A>&nbsp;val)</PRE>
<DL>
<DD>Set a global variable or parameter in the global stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - Local variable index relative to the global stack frame
bottom.<DD><CODE>val</CODE> - The value of the variable that is being set.</DL>
</DD>
</DL>
<HR>
<A NAME="getGlobalVariable(org.apache.xpath.XPathContext, int)"><!-- --></A><H3>
getGlobalVariable</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getGlobalVariable</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a global variable or parameter from the global stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath context, which must be passed in order to
lazy evaluate variables.<DD><CODE>index</CODE> - Global variable index relative to the global stack
frame bottom.<DT><B>Returns:</B><DD>The value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="getGlobalVariable(org.apache.xpath.XPathContext, int, boolean)"><!-- --></A><H3>
getGlobalVariable</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getGlobalVariable</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
int&nbsp;index,
boolean&nbsp;destructiveOK)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a global variable or parameter from the global stack frame.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath context, which must be passed in order to
lazy evaluate variables.<DD><CODE>index</CODE> - Global variable index relative to the global stack
frame bottom.<DT><B>Returns:</B><DD>The value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>
<A NAME="getVariableOrParam(org.apache.xpath.XPathContext, org.apache.xml.utils.QName)"><!-- --></A><H3>
getVariableOrParam</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>getVariableOrParam</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
<A HREF="../../../org/apache/xml/utils/QName.html">QName</A>&nbsp;qname)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get a variable based on it's qualified name.
This is for external use only.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath context, which must be passed in order to
lazy evaluate variables.<DD><CODE>qname</CODE> - The qualified name of the variable.<DT><B>Returns:</B><DD>The evaluated value of the variable.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VariableStack.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xpath/SourceTreeManager.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xpath/XPath.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VariableStack.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>