## net.sf.saxon.expr
Class LocalVariableReference

    java.lang.Object
      net.sf.saxon.expr.Expression
          net.sf.saxon.expr.VariableReference
              net.sf.saxon.expr.LocalVariableReference

All Implemented Interfaces:
  Serializable, SourceLocator, BindingReference, Container, EvaluableItem, SequenceIterable, InstructionInfoProvider

    public class LocalVariableReference

extends VariableReference

Variable reference: a reference to a local variable. This subclass of VariableReference bypasses the Binding object to get the value directly from the relevant slot in the local stackframe.

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Constructor Summary
`LocalVariableReference(int slotNumber)`

Method Summary
`ValueRepresentation` `evaluateVariable(XPathContext c)`
`int` `getSlotNumber()`
`void` `refineVariableReference()` Replace this VariableReference where appropriate by a more efficient implementation.

Methods inherited from class net.sf.saxon.expr.VariableReference
`computeCardinality, computeSpecialProperties, copy, display, equals, evaluateItem, fixup, getBinding, getImplementationMethod, getIntrinsicDependencies, getItemType, hashCode, iterate, optimize, process, promote, setStaticType, typeCheck`

Methods inherited from class net.sf.saxon.expr.Expression

`adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getContainingProcedure, getDependencies, getExecutable, getHostLanguage, getInstructionInfo, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterateSubExpressions, markTailFunctionCalls, replaceSubExpression, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, simplify, suppressValidation`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalVariableReference

    public LocalVariableReference(int slotNumber)

Method Detail

### getSlotNumber

    public int getSlotNumber()

### evaluateVariable

    public ValueRepresentation evaluateVariable(XPathContext c)
                                         throws XPathException

  Overrides:
    `evaluateVariable` in class `VariableReference`
  Throws:
    `XPathException`

### refineVariableReference

    public void refineVariableReference()

  Replace this VariableReference where appropriate by a more efficient implementation.

  Overrides:
    `refineVariableReference` in class `VariableReference`

Copyright (C) Michael H. Kay. All rights reserved.