public abstract class SimpleExpression extends Expression implements Callable
An implementation of this class must supply the Callable.call(XPathContext, net.sf.saxon.om.Sequence[])
method to evaluate the expression and return its result.
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD| Constructor and Description |
|---|
SimpleExpression()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeCardinality()
Determine the static cardinality of the expression.
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
protected SimpleExpression |
copyOperandsFrom(SimpleExpression se1)
Helper method for subclasses to implement the copy() operation: this method can be applied
to the new expression to copy operands from the old expressions
|
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item.
|
void |
export(ExpressionPresenter destination)
Diagnostic print of expression structure.
|
java.lang.String |
getExpressionType()
Return a distinguishing name for the expression, for use in diagnostics.
|
ItemType |
getItemType()
Determine the data type of the items returned by this expression.
|
protected OperandArray |
getOperanda()
Get the data structure holding the operands of this expression.
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
java.lang.Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
void |
process(XPathContext context)
Process the instruction, without returning any tail calls
|
void |
setArguments(Expression[] sub)
Set the immediate sub-expressions of this expression.
|
protected void |
setOperanda(OperandArray operanda)
Set the data structure for the operands of this expression.
|
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExpressionName, getExtraProperty, getImplementationMethod, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointersprotected void setOperanda(OperandArray operanda)
operanda - the data structure for expression operandsprotected OperandArray getOperanda()
public java.lang.Iterable<Operand> operands()
ExpressionIf the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands in class Expressionpublic void setArguments(Expression[] sub)
sub - an array containing the sub-expressions of this expressionpublic Expression copy(RebindingMap rebindings)
copy in class Expressionrebindings - protected SimpleExpression copyOperandsFrom(SimpleExpression se1)
se1 - the expression being copiedpublic ItemType getItemType()
getItemType in class Expressionpublic int computeCardinality()
computeCardinality in class ExpressionStaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE,
StaticProperty.ALLOWS_ZERO_OR_MOREpublic final Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in class Expressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic final SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic final void process(XPathContext context) throws XPathException
process in class Expressioncontext - The dynamic context, giving access to the current node,
the current variables, etc.XPathException - if a dynamic error occurspublic void export(ExpressionPresenter destination) throws XPathException
export in interface ExportAgentexport in class Expressiondestination - the expression presenter used to display the structureXPathException - if the export fails, for example if an expression is found that won't work
in the target environment.public java.lang.String getExpressionType()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.