public abstract class Evaluator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Evaluator |
EAGER_SEQUENCE
An evaluator for arguments that in general return a sequence, where the sequence is evaluated
eagerly.
|
static Evaluator |
EMPTY_SEQUENCE
An evaluator that always returns the empty sequence
|
static Evaluator |
LAZY_SEQUENCE
An evaluator for arguments that in general return a sequence, where the sequence is evaluated
lazily on first use.
|
static Evaluator |
LAZY_TAIL
An evaluator for arguments that in general return a sequence, where the sequence is evaluated
lazily on first use.
|
static Evaluator |
LITERAL
An evaluator for arguments supplied as a literal
|
static Evaluator |
MAKE_INDEXED_VARIABLE
An evaluator for an expression that makes use of an indexed variable
|
static Evaluator |
MEMO_CLOSURE
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 Evaluator |
MEMO_SEQUENCE
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 Evaluator |
OPTIONAL_ITEM
A (default) evaluator for arguments supplied as an expression that will return either a
singleton item, or an empty sequence
|
static Evaluator |
PROCESS
A push-mode evaluator for an expression
|
static Evaluator |
SHARED_APPEND
An evaluator for "shared append" expressions: used when the argument to a function
is a block potentially containing a recursive call.
|
static Evaluator |
SINGLE_ITEM
A (default) evaluator for arguments supplied as an expression that will always return a
singleton item
|
static Evaluator |
SINGLETON_CLOSURE
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 Evaluator |
STREAMING_ARGUMENT
An evaluator for the first (streamed) argument of a streamable function call.
|
static Evaluator |
SUPPLIED_PARAMETER
An evaluator for a reference to an external parameter value
|
static Evaluator |
VARIABLE
An evaluator for arguments supplied as a variable reference
|
Constructor and Description |
---|
Evaluator() |
Modifier and Type | Method and Description |
---|---|
abstract Sequence<?> |
evaluate(Expression expr,
XPathContext context)
Evaluate an expression to return a sequence
|
static Evaluator |
evaluatorForCode(int code) |
abstract int |
getCode()
Get an integer code identifying this evaluator (for use in the SEF file).
|
public static final Evaluator EMPTY_SEQUENCE
public static final Evaluator LITERAL
public static final Evaluator VARIABLE
public static final Evaluator SUPPLIED_PARAMETER
public static final Evaluator SINGLE_ITEM
public static final Evaluator OPTIONAL_ITEM
public static final Evaluator LAZY_SEQUENCE
LazySequence
, which can only be read once, so
this is only suitable for use when calling a function that can be trusted to read the argument
once only.public static final Evaluator MEMO_SEQUENCE
public static final Evaluator MEMO_CLOSURE
public static final Evaluator SINGLETON_CLOSURE
public static final Evaluator EAGER_SEQUENCE
public static final Evaluator SHARED_APPEND
public static final Evaluator STREAMING_ARGUMENT
public static final Evaluator MAKE_INDEXED_VARIABLE
public static final Evaluator PROCESS
public static final Evaluator LAZY_TAIL
LazySequence
, which can only be read once, so
this is only suitable for use when calling a function that can be trusted to read the argument
once only.public static Evaluator evaluatorForCode(int code)
public abstract Sequence<?> evaluate(Expression expr, XPathContext context) throws XPathException
expr
- the expression to be evaluatedcontext
- the dynamic context for evaluationXPathException
- if any dynamic error occurs during the evaluationpublic abstract int getCode()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.