net.sf.saxon.expr
public class VariableReference extends ComputedExpression implements BindingReference
Field Summary | |
---|---|
Binding | binding |
Value | constantValue |
String | displayName |
SequenceType | staticType |
Constructor Summary | |
---|---|
VariableReference(VariableDeclaration declaration)
Constructor |
Method Summary | |
---|---|
int | computeCardinality()
Get the static cardinality |
int | computeSpecialProperties()
Determine the special properties of this expression |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure |
boolean | equals(Object other)
Test if this expression is the same as another expression.
|
Item | evaluateItem(XPathContext c) |
ValueRepresentation | evaluateVariable(XPathContext c) |
void | fixup(Binding binding)
Fix up this variable reference to a Binding object, which enables the value of the variable
to be located at run-time. |
Binding | getBinding()
Get the object bound to the variable |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int | getIntrinsicDependencies() |
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible |
int | hashCode()
get HashCode for comparing two expressions |
SequenceIterator | iterate(XPathContext c)
Get the value of this variable in a given context. |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType)
Type-check the expression. |
void | process(XPathContext c) |
Expression | promote(PromotionOffer offer)
Promote this expression if possible |
void | setStaticType(SequenceType type, Value value, int properties)
Set static type. |
Expression | simplify(StaticContext env)
Simplify the expression. |
Expression | typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression. |
Parameters: declaration the variable declaration to which this variable refers
Returns: NON_CREATIVE (unless the variable is assignable using saxon:assign)
Parameters: th
Returns: the type of the variable, if this can be determined statically; otherwise Type.ITEM (meaning not known in advance)
Parameters: c the XPathContext which contains the relevant variable bindings
Returns: the value of the variable, if it is defined
Throws: XPathException if the variable is undefined