public final class TailCallLoop extends UnaryExpression
Modifier and Type | Class and Description |
---|---|
protected static class |
TailCallLoop.TailCallComponent |
protected static class |
TailCallLoop.TailCallFunction |
static interface |
TailCallLoop.TailCallInfo |
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 |
---|
TailCallLoop(UserFunction function,
Expression body)
Constructor - create a TailCallLoop
|
Modifier and Type | Method and Description |
---|---|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate as an Item.
|
UserFunction |
getContainingFunction()
Get the containing function
|
java.lang.String |
getExpressionName()
Give a string representation of the expression name for use in diagnostics
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType()
Determine the data type of the items returned by the expression
/*@NotNull
|
protected OperandRole |
getOperandRole()
Get the usage (in terms of streamability analysis) of the single operand
|
SequenceIterator |
iterate(XPathContext context)
Iterate over the sequence of values
|
void |
process(XPathContext context)
Process the function body
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression
|
computeCardinality, computeHashCode, computeSpecialProperties, displayOperator, equals, export, getBaseExpression, getOperand, operands, optimize, setBaseExpression, toShortString, toString
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExtraProperty, 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, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public TailCallLoop(UserFunction function, Expression body)
function
- the function in which this tail call loop appearsbody
- the function body (before wrapping in the tail call loop)public UserFunction getContainingFunction()
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck
in class UnaryExpression
visitor
- an expression visitorcontextInfo
- Information available statically about the context item: whether it is (possibly)
absent; its static type; its streaming posture.XPathException
- if an error is discovered during this phase
(typically a type error)public int getImplementationMethod()
getImplementationMethod
in class Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
protected OperandRole getOperandRole()
UnaryExpression
getOperandRole
in class UnaryExpression
public Expression copy(RebindingMap rebindings)
copy
in class Expression
rebindings
- public SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in class Expression
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in class Expression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic void process(XPathContext context) throws XPathException
process
in class Expression
context
- The dynamic context, giving access to the current node,
the current variables, etc.XPathException
- if a dynamic error occurspublic ItemType getItemType()
getItemType
in class UnaryExpression
public java.lang.String getExpressionName()
getExpressionName
in class Expression
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.