|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.instruct.Bindery
public final class Bindery
The Bindery class holds information about variables and their values. From Saxon 8.1, it is used only for global variables: local variables are now held in the XPathContext object. Variables are identified by a Binding object. Values will always be of class Value.
Constructor Summary | |
---|---|
Bindery()
|
Method Summary | |
---|---|
void |
allocateGlobals(SlotManager map)
Define how many slots are needed for global variables |
void |
assignGlobalVariable(GlobalVariable binding,
ValueRepresentation value)
Assign a new value to a global variable. |
void |
defineGlobalParameters(GlobalParameterSet params)
Define global parameters |
void |
defineGlobalVariable(GlobalVariable binding,
ValueRepresentation value)
Provide a value for a global variable |
ValueRepresentation |
getGlobalVariable(int slot)
Get the value of a global variable whose slot number is known |
SlotManager |
getGlobalVariableMap()
Get the Global Variable Map, containing the mapping of variable names (fingerprints) to slot numbers. |
ValueRepresentation[] |
getGlobalVariables()
Get all the global variables, as an array. |
ValueRepresentation |
getGlobalVariableValue(GlobalVariable binding)
Get the value of a global variable |
void |
setExecuting(GlobalVariable binding,
boolean executing)
Set/Unset a flag to indicate that a particular global variable is currently being evaluated. |
void |
setGlobalVariable(int slot,
ValueRepresentation value)
Set the value of a global variable whose slot number is known |
boolean |
useGlobalParameter(StructuredQName qName,
int slot,
SequenceType requiredType,
XPathContext context)
Use global parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Bindery()
Method Detail |
---|
public void allocateGlobals(SlotManager map)
map
- the SlotManager that keeps track of slot allocation for global variables.public void defineGlobalParameters(GlobalParameterSet params)
params
- The ParameterSet passed in by the user, eg. from the command linepublic boolean useGlobalParameter(StructuredQName qName, int slot, SequenceType requiredType, XPathContext context) throws XPathException
qName
- The name of the parameterslot
- The slot number allocated to the parameterrequiredType
- The declared type of the parametercontext
- the XPath dynamic evaluation context
XPathException
public void defineGlobalVariable(GlobalVariable binding, ValueRepresentation value)
binding
- identifies the variablevalue
- the value of the variablepublic void setExecuting(GlobalVariable binding, boolean executing) throws XPathException
binding
- the global variable in questionexecuting
- true when we start evaluating the variable, false when evaluation has finished
XPathException
- If an attempt is made to set the flag when it is already set, this means
the definition of the variable is circular.public ValueRepresentation getGlobalVariableValue(GlobalVariable binding)
binding
- the Binding that establishes the unique instance of the variable
public ValueRepresentation getGlobalVariable(int slot)
slot
- the slot number of the required variable
public void setGlobalVariable(int slot, ValueRepresentation value)
slot
- the slot number of the required variablevalue
- the Value of the variable if defined, null otherwise.public void assignGlobalVariable(GlobalVariable binding, ValueRepresentation value)
binding
- identifies the global variable or parametervalue
- the value to be assigned to the variablepublic SlotManager getGlobalVariableMap()
public ValueRepresentation[] getGlobalVariables()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |