public class LocalVariableBinding extends java.lang.Object implements LocalBinding
| Constructor and Description |
|---|
LocalVariableBinding(StructuredQName name,
SequenceType type)
Create a LocalVariableBinding
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReference(VariableReference ref,
boolean isLoopingReference)
Register a variable reference that refers to the variable bound in this expression
|
LocalVariableBinding |
copy()
Make a copy of this LocalVariableBinding (except for the slot number)
|
Sequence<?> |
evaluateVariable(XPathContext context)
Get the value of the range variable
|
IntegerValue[] |
getIntegerBoundsForVariable()
If the variable is bound to an integer, get the minimum and maximum possible values.
|
int |
getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number.
|
int |
getNominalReferenceCount()
Get the (nominal) count of the number of references to this variable
|
SequenceType |
getRequiredType()
Get the required type (declared type) of the variable
|
StructuredQName |
getVariableQName()
Get the name of the variable
|
boolean |
isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign
extension element.
|
boolean |
isGlobal()
Indicate whether the binding is local or global.
|
boolean |
isIndexedVariable()
Ask whether the binding is to be indexed
|
void |
setIndexedVariable()
Indicate that the variable bound by this let expression should be indexable
(because it is used in an appropriate filter expression)
|
void |
setRequiredType(SequenceType type)
Set the required or inferred type of the variable
|
void |
setSlotNumber(int nr)
Set the slot number for the range variable
|
void |
setVariableQName(StructuredQName variableName)
Set the name of the variable
|
public LocalVariableBinding(StructuredQName name, SequenceType type)
name - the name of the variabletype - the static type of the variablepublic LocalVariableBinding copy()
public StructuredQName getVariableQName()
getVariableQName in interface Bindingpublic void setRequiredType(SequenceType type)
type - the required or inferred typepublic SequenceType getRequiredType()
getRequiredType in interface Bindingpublic IntegerValue[] getIntegerBoundsForVariable()
getIntegerBoundsForVariable in interface Bindingpublic int getNominalReferenceCount()
public void addReference(VariableReference ref, boolean isLoopingReference)
addReference in interface Bindingref - isLoopingReference - - true if the reference occurs within a loop, such as the predicate
of a filter expressionpublic void setIndexedVariable()
setIndexedVariable in interface LocalBindingpublic boolean isIndexedVariable()
LocalBindingisIndexedVariable in interface LocalBindingpublic void setVariableQName(StructuredQName variableName)
variableName - the name of the variablepublic void setSlotNumber(int nr)
nr - the slot number to be usedpublic int getLocalSlotNumber()
getLocalSlotNumber in interface LocalBindingpublic Sequence<?> evaluateVariable(XPathContext context)
evaluateVariable in interface Bindingcontext - the XPath dynamic evaluation contextpublic boolean isAssignable()
isAssignable in interface BindingCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.