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

## net.sf.saxon.expr
Class RootExpression

    java.lang.Object
      net.sf.saxon.expr.ComputedExpression
          net.sf.saxon.expr.SingleNodeExpression
              net.sf.saxon.expr.RootExpression

All Implemented Interfaces:
  Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator

public class RootExpression
extends SingleNodeExpression

An expression whose value is always a set of nodes containing a single node, the document root. Note that the root of a tree is not necessarily a document node.

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.expr.ComputedExpression
`locationId, staticProperties`

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

Constructor Summary
`RootExpression()`

Method Summary
`int` | `computeCardinality()` Specify that the expression returns a singleton
`void` | `display(int level, NamePool pool, java.io.PrintStream out)` Diagnostic print of expression structure
`boolean` | `equals(java.lang.Object other)` Is this expression the same as another expression?
`int` | `getIntrinsicDependencies()` Determine which aspects of the context the expression depends on.
`NodeInfo` | `getNode(XPathContext context)` Return the first element selected by this Expression
`int` | `hashCode()` get HashCode for comparing two expressions
`Expression` | `simplify(StaticContext env)` Simplify an expression

Methods inherited from class net.sf.saxon.expr.SingleNodeExpression
`analyze, computeSpecialProperties, effectiveBooleanValue, evaluateItem, getItemType, iterate`

Methods inherited from class net.sf.saxon.expr.ComputedExpression
`adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, dynamicError, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getImplementationMethod, getInstructionInfo, getLineNumber, getLocationId, getParentExpression, getPublicId, getSpecialProperties, getSystemId, iterateSubExpressions, markTailFunctionCalls, process, promote, resetStaticProperties, setLocationId, setParentExpression, typeError, typeError`

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

Constructor Detail

### RootExpression

    public RootExpression()

Method Detail

### simplify

    public Expression simplify(StaticContext env)
                        throws StaticError

  Simplify an expression

  Specified by:
    `simplify` in interface `Expression`
  Overrides:
    `simplify` in class `ComputedExpression`
  Returns:
    the simplified expression
  Throws:
    `StaticError`

### equals

    public boolean equals(java.lang.Object other)

  Is this expression the same as another expression?

### computeCardinality

    public final int computeCardinality()

  Specify that the expression returns a singleton

  Overrides:
    `computeCardinality` in class `SingleNodeExpression`

### hashCode

    public int hashCode()

  get HashCode for comparing two expressions

### getNode

    public NodeInfo getNode(XPathContext context)
                     throws XPathException

  Return the first element selected by this Expression

  Specified by:
    `getNode` in class `SingleNodeExpression`
  Parameters:
    `context` - The evaluation context
  Returns:
    the NodeInfo of the first selected element, or null if no element is selected
  Throws:
    `XPathException`

### getIntrinsicDependencies

    public int getIntrinsicDependencies()

  Determine which aspects of the context the expression depends on. The result is a bitwise-or'ed value composed from constants such as StaticProperty.VARIABLES and StaticProperty.CURRENT_NODE

  Overrides:
    `getIntrinsicDependencies` in class `SingleNodeExpression`

### display

    public void display(int level,
                        NamePool pool,
                        java.io.PrintStream out)

  Diagnostic print of expression structure

  Parameters:
    `level` - indentation level for this expression
    `pool` - NamePool used to expand any names appearing in the expression
    `out` - Output destination

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