Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xml.xpath
Class VariableReference

    java.lang.Object
      com.novell.xml.xpath.VariableReference

All Implemented Interfaces:
  Expression

    public class VariableReference

extends Object
implements Expression

Implements an XPath VariableReference Note: The only reason this really exists anymore is so that dump() and toString() work correctly

Constructor Summary
`VariableReference(ExpandedQName name, Expression variable)` Construct a VariableReference based on the passed name.

Method Summary
`void` | `dump(PrintWriter writer, int indent)` Print the expression in a readable form for debugging.
`ExpressionValue` | `evaluate(Node contextNode, ExpressionContext context)` Evaluate the expression with repect to the passed context
`Class` | `getResultType()` Return the Class object describing the result type of the expression.
`boolean` | `isConstant()` Return true if the expression is a constant value.
`void` | `registerForReset(XPathResetRegistrar registrar)` Register this expression or any subexpression that implements XPathResetCache with an object that wants to call `resetCache()`
`String` | `toString()` Provide a readable description for debugging.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VariableReference

    public VariableReference(ExpandedQName name,
                             Expression variable)

  Construct a VariableReference based on the passed name.

  Parameters:
    `name` - The name of the variable

Method Detail

### toString

    public String toString()

  Provide a readable description for debugging.

  Overrides:
    `toString` in class `Object`
  Returns:
    String representation

### evaluate

    public ExpressionValue evaluate(Node contextNode,
                                    ExpressionContext context)
                             throws XPathEvaluationException

  Evaluate the expression with repect to the passed context

  Specified by:
    `evaluate` in interface `Expression`
  Parameters:
    `contextNode` - context node for expression evaluation
    `context` - expression context for expression evaluation
  Returns:
    result of evaluating expression
  Throws:
    `XPathEvaluationException`

### isConstant

    public boolean isConstant()

  Return true if the expression is a constant value.

  Specified by:
    `isConstant` in interface `Expression`
  Returns:
    false (variables aren't constant)

### dump

    public void dump(PrintWriter writer,
                     int indent)

  Print the expression in a readable form for debugging.

  Specified by:
    `dump` in interface `Expression`
  Parameters:
    `writer` - The output device.
    `indent` - Number of tabs to indent the result.

### getResultType

    public Class getResultType()

  Return the Class object describing the result type of the expression.

  Specified by:
    `getResultType` in interface `Expression`
  Returns:
    A Class object.

### registerForReset

    public void registerForReset(XPathResetRegistrar registrar)

  Register this expression or any subexpression that implements XPathResetCache with an object that wants to call `resetCache()`

  Specified by:
    `registerForReset` in interface `Expression`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD