Class Evaluator

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Evaluator.EagerSequence
      An evaluator for arguments that in general return a sequence, where the sequence is evaluated eagerly.
      static class  Evaluator.EmptySequenceEvaluator
      An evaluator that always returns the empty sequence
      static class  Evaluator.LazySequence
      An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use.
      static class  Evaluator.LazyTail
      An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use.
      static class  Evaluator.Literal
      An evaluator for arguments supplied as a literal
      static class  Evaluator.MakeIndexedVariable
      An evaluator for an expression that makes use of an indexed variable
      static class  Evaluator.MemoClosureEvaluator
      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 class  Evaluator.OptionalItem
      A (default) evaluator for arguments supplied as an expression that will return either a singleton item, or an empty sequence
      static class  Evaluator.Process
      A push-mode evaluator for an expression
      static class  Evaluator.SharedAppend
      An evaluator for "shared append" expressions: used when the argument to a function is a block potentially containing a recursive call.
      static class  Evaluator.SingleItem
      A (default) evaluator for arguments supplied as an expression that will always return a singleton item
      static class  Evaluator.SingletonClosure
      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 class  Evaluator.StreamingArgument
      An evaluator for the first (streamed) argument of a streamable function call.
      static class  Evaluator.SuppliedParameter
      An evaluator for a reference to an external parameter value
      static class  Evaluator.Variable
      An evaluator for arguments supplied as a variable reference
    • Constructor Summary

      Constructors 
      Constructor Description
      Evaluator()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract Sequence evaluate​(Expression expr, XPathContext context)
      Evaluate an expression to return a sequence
      abstract int getCode()
      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 Detail

      • Evaluator

        public Evaluator()
    • Method Detail

      • 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