| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.VariableReference
VariableReference | public class VariableReference extends ComputedExpression implements BindingReference(Code) | | Variable reference: a reference to a variable. This may be an XSLT-defined variable, a range
variable defined within the XPath expression, or a variable defined in some other static context.
|
Method Summary | |
public int | computeCardinality() | public int | computeSpecialProperties() | public void | display(int level, NamePool pool, PrintStream out) | public boolean | equals(Object other) Test if this expression is the same as another expression. | public Item | evaluateItem(XPathContext c) | public ValueRepresentation | evaluateVariable(XPathContext c) | public 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. | public Binding | getBinding() | public int | getImplementationMethod() An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is provided. | public int | getIntrinsicDependencies() | public ItemType | getItemType(TypeHierarchy th) | public int | hashCode() | public SequenceIterator | iterate(XPathContext c) Get the value of this variable in a given context. | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) Type-check the expression. | public void | process(XPathContext c) | public Expression | promote(PromotionOffer offer) | public void | setStaticType(SequenceType type, Value value, int properties) Set static type. | public Expression | simplify(StaticContext env) Simplify the expression. | public Expression | typeCheck(StaticContext env, ItemType contextItemType) Type-check the expression. |
VariableReference | public VariableReference(VariableDeclaration declaration)(Code) | | Constructor
Parameters: declaration - the variable declaration to which this variable refers |
computeCardinality | public int computeCardinality()(Code) | | Get the static cardinality
|
computeSpecialProperties | public int computeSpecialProperties()(Code) | | Determine the special properties of this expression
StaticProperty.NON_CREATIVE (unless the variable is assignable using saxon:assign) |
equals | public boolean equals(Object other)(Code) | | Test if this expression is the same as another expression.
(Note, we only compare expressions that
have the same static and dynamic context).
|
fixup | public void fixup(Binding binding)(Code) | | Fix up this variable reference to a Binding object, which enables the value of the variable
to be located at run-time.
|
getBinding | public Binding getBinding()(Code) | | Get the object bound to the variable
|
getImplementationMethod | public int getImplementationMethod()(Code) | | An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is provided. This implementation provides both all three methods
natively.
|
getIntrinsicDependencies | public int getIntrinsicDependencies()(Code) | | |
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the expression, if possible
the type of the variable, if this can be determined statically;otherwise Type.ITEM (meaning not known in advance) Parameters: th - |
hashCode | public int hashCode()(Code) | | get HashCode for comparing two expressions
|
setStaticType | public void setStaticType(SequenceType type, Value value, int properties)(Code) | | Set static type. This is a callback from the variable declaration object. As well
as supplying the static type, it may also supply a compile-time value for the variable.
As well as the type information, other static properties of the value are supplied:
for example, whether the value is an ordered node-set.
|
typeCheck | public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Type-check the expression. At this stage details of the static type must be known.
If the variable has a compile-time value, this is substituted for the variable reference
|
|
|