net.sf.saxon.instruct
Class SlotManager
java.lang.Object
net.sf.saxon.instruct.SlotManager
- Serializable
public class SlotManager
extends java.lang.Object
implements Serializable
A SlotManager supports functions, templates, etc: specifically, any executable code that
requires a stack frame containing local variables. In XSLT a SlotManager underpins any
top-level element that can contain local variable declarations,
specifically, a top-level xsl:template, xsl:variable, xsl:param, or xsl:function element
or an xsl:attribute-set element or xsl:key element. In XQuery it underpins functions and
global variables. The purpose of the SlotManager is to allocate slot numbers to variables
in the stack, and to record how many slots are needed. A Debugger may define a subclass
with additional functionality.
SlotManager() - The constructor should not be called directly.
|
SlotManager(int n) - Create a SlotManager with a given number of slots
|
EMPTY
public static SlotManager EMPTY
An empty SlotManager
SlotManager
public SlotManager()
SlotManager
public SlotManager(int n)
Create a SlotManager with a given number of slots
allocateSlotNumber
public int allocateSlotNumber(StructuredQName qName)
Allocate a slot number for a variable
getNumberOfVariables
public int getNumberOfVariables()
Get number of variables (size of stack frame)
getVariableMap
public List getVariableMap()
Get the variable map (simply a list of variable names as structured QNames). Note that it
is possible for several variables to have the same name.
Changed in Saxon 9.0 to return a list of StructuredQName values rather than integers
setNumberOfVariables
public void setNumberOfVariables(int numberOfVariables)
Set the number of variables