public final class SimpleStepExpression extends SlashExpression
operator
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
SimpleStepExpression(Expression start,
Expression step) |
Modifier and Type | Method and Description |
---|---|
SimpleStepExpression |
copy(RebindingMap rebindings)
Copy an expression.
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
protected OperandRole |
getOperandRole(int arg)
Get the operand role
|
SequenceIterator<?> |
iterate(XPathContext context)
Evaluate the expression, returning an iterator over the result
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression
|
addToPathMap, computeCardinality, computeHashCode, computeSpecialProperties, equals, export, getActionExpression, getCost, getFirstStep, getIntegerBounds, getItemType, getLastStep, getLeadingSteps, getRemainingSteps, getSelectExpression, getStart, getStaticUType, getStep, getStreamerName, isAbsolute, isContextFree, promoteFocusIndependentSubexpressions, setContextFree, setStart, setStep, simplifyDescendantPath, toPattern, toShortString, toString, tryToMakeAbsolute, tryToMakeSorted, unordered
displayOperator, explainExtraAttributes, getLhs, getLhsExpression, getOperator, getRhs, getRhsExpression, isAssociative, isCommutative, isInverse, operands, setFlattened, setLhsExpression, setRhsExpression, tag
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getDependencies, getEvaluationMethod, getExtraProperty, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, verifyParentPointers
public SimpleStepExpression(Expression start, Expression step)
protected OperandRole getOperandRole(int arg)
BinaryExpression
getOperandRole
in class SlashExpression
arg
- which argument: 0 for the lhs, 1 for the rhspublic Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
SlashExpression
typeCheck
in class SlashExpression
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 Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
BinaryExpression
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize
in class SlashExpression
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public SimpleStepExpression copy(RebindingMap rebindings)
copy
in class SlashExpression
rebindings
- public int getImplementationMethod()
getImplementationMethod
in class SlashExpression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public SequenceIterator<?> iterate(XPathContext context) throws XPathException
iterate
in class SlashExpression
context
- the evaluation contextXPathException
- if any dynamic error occurs evaluating the
expressionpublic java.lang.String getExpressionName()
Expression
getExpressionName
in class SlashExpression
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.