public class StreamInstr extends SourceDocument implements PushToPull.Pusher
accumulators, bodyOp, hrefOp, parseOptions
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 |
---|
StreamInstr(Expression hrefExp,
Expression body,
ParseOptions options) |
Modifier and Type | Method and Description |
---|---|
Expression |
checkStreamability(java.util.List<java.lang.String> reasons,
int streamability,
boolean strict) |
int |
computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions.
|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type).
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
Inversion |
getAction() |
java.lang.String |
getExportTag() |
SequenceIterator<?> |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
boolean |
mayCreateNewNodes()
Determine whether this instruction creates new nodes.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
void |
prepareForStreaming() |
Expression |
prepareForStreaming(PackageData pack) |
void |
push(XPathContext context)
Evaluate the instruction in push mode
|
allowExtractingCommonSubexpressions, export, getBody, getExpressionName, getHref, operands, processLeavingTail, setBody, setHref, setUsedAccumulators, typeCheck
alwaysCreatesNewNodes, assembleParams, assembleTunnelParams, computeCardinality, dynamicError, evaluateAsString, evaluateItem, getConstructType, getImplementationMethod, getInstructionNameCode, getItemType, getNetCost, getSourceLocator, isInstruction, isXSLT, process, someOperandCreatesNewNodes
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeHashCode, computeStaticProperties, dynamicError, effectiveBooleanValue, equals, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isLiftable, isMultiThreaded, 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, toShortString, toString, typeCheckChildren, typeError, unordered, verifyParentPointers
public StreamInstr(Expression hrefExp, Expression body, ParseOptions options)
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
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 SourceDocument
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 Expression prepareForStreaming(PackageData pack) throws XPathException
XPathException
public void prepareForStreaming() throws XPathException
prepareForStreaming
in class Expression
XPathException
public Expression checkStreamability(java.util.List<java.lang.String> reasons, int streamability, boolean strict) throws XPathException
XPathException
public boolean mayCreateNewNodes()
mayCreateNewNodes
in class SourceDocument
public int computeDependencies()
computeDependencies
in class SourceDocument
public int computeSpecialProperties()
computeSpecialProperties
in class SourceDocument
public Inversion getAction()
public Expression copy(RebindingMap rebindings)
copy
in class SourceDocument
rebindings
- variables that need to be re-boundpublic void push(XPathContext context) throws XPathException
push
in interface PushToPull.Pusher
push
in class SourceDocument
context
- the evaluation contextXPathException
- in the event of a failureQuitParsingException
- if there was an early exit, that is, if the instruction was evaluated
without reading the input to completionpublic SequenceIterator<?> iterate(XPathContext context) throws XPathException
iterate
in class Instruction
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic java.lang.String getExportTag()
getExportTag
in class SourceDocument
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.