Class Evaluator

java.lang.Object
net.sf.saxon.expr.parser.Evaluator
Direct Known Subclasses:
Evaluator.EagerSequence, Evaluator.EmptySequenceEvaluator, Evaluator.LazySequence, Evaluator.LazyTail, Evaluator.Literal, Evaluator.MakeIndexedVariable, Evaluator.MemoClosureEvaluator, Evaluator.OptionalItem, Evaluator.Process, Evaluator.SharedAppend, Evaluator.SingleItem, Evaluator.SingletonClosure, Evaluator.StreamingArgument, Evaluator.SuppliedParameter, Evaluator.Variable

public abstract class Evaluator extends Object
An Evaluator evaluates an expression to return a sequence
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated eagerly.
    static final class 
    An evaluator that always returns the empty sequence
    static final class 
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use.
    static final class 
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use.
    static final class 
    An evaluator for arguments supplied as a literal
    static final class 
    An evaluator for an expression that makes use of an indexed variable
    static final class 
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use, and where the value might be needed more than once.
    static final class 
    A (default) evaluator for arguments supplied as an expression that will return either a singleton item, or an empty sequence
    static final class 
    A push-mode evaluator for an expression
    static final class 
    An evaluator for "shared append" expressions: used when the argument to a function is a block potentially containing a recursive call.
    static final class 
    A (default) evaluator for arguments supplied as an expression that will always return a singleton item
    static final class 
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use, and where the value might be needed more than once.
    static final class 
    An evaluator for the first (streamed) argument of a streamable function call.
    static final class 
    An evaluator for a reference to an external parameter value
    static final class 
    An evaluator for arguments supplied as a variable reference
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Sequence
    Evaluate an expression to return a sequence
    abstract int
    Get the integer code for the evaluator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Evaluator

      public Evaluator()
  • Method Details

    • getCode

      public abstract int getCode()
      Get the integer code for the evaluator
      Returns:
      the integer code for the evaluator
    • evaluate

      public abstract Sequence evaluate(Expression expr, XPathContext context) throws XPathException
      Evaluate an expression to return a sequence
      Parameters:
      expr - the expression to be evaluated
      context - the dynamic context for evaluation
      Returns:
      the result of the evaluation
      Throws:
      XPathException - if any dynamic error occurs during the evaluation