public class StreamInstr extends Instruction
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 |
---|
StreamInstr(Expression hrefExp,
Expression body,
int validation,
SchemaType type,
List<Accumulator> accumulators) |
Modifier and Type | Method and Description |
---|---|
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()
Copy an expression.
|
boolean |
createsNewNodes()
Determine whether this instruction creates new nodes.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
Inversion |
getAction() |
Expression |
getBody() |
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the Stream expression
|
String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
Expression |
getHref() |
protected StreamingAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
Expression |
prepareForStreaming(PackageData pack) |
TailCall |
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
Expression |
promote(PromotionOffer offer)
Offer promotion for this subexpression.
|
protected void |
promoteChildren(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites.
|
void |
setBody(Expression body) |
void |
setHref(Expression href) |
void |
setUsedAccumulators(List<Accumulator> used) |
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform type checking of an expression and its subexpressions.
|
assembleParams, assembleTunnelParams, computeCardinality, dynamicError, evaluateAsString, evaluateItem, getConstructType, getImplementationMethod, getInstructionName, getInstructionNameCode, getItemType, getNetCost, getSourceLocator, isXSLT, main, process, toStreamingPattern
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLocation, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, optimizeForType, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unordered
public StreamInstr(Expression hrefExp, Expression body, int validation, SchemaType type, List<Accumulator> accumulators)
public String getExpressionName()
getExpressionName
in class Instruction
public Expression getHref()
public void setHref(Expression href)
public Expression getBody()
public void setBody(Expression body)
public void setUsedAccumulators(List<Accumulator> used)
public Iterable<Operand> operands()
Expression
If 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 Instruction
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck
in class Expression
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
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 Expression
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 boolean createsNewNodes()
createsNewNodes
in class Instruction
public int computeDependencies()
computeDependencies
in class Expression
public int computeSpecialProperties()
computeSpecialProperties
in class Instruction
public Inversion getAction()
public void export(ExpressionPresenter out)
export
in class Expression
out
- the expression presenter used to display the structurepublic Expression copy()
copy
in class Expression
public Expression promote(PromotionOffer offer) throws XPathException
Expression
promote
in class Expression
offer
- details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException
- if any error is detectedprotected void promoteChildren(PromotionOffer offer) throws XPathException
Instruction
promoteChildren
in class Instruction
offer
- The type of rewrite being offeredXPathException
- if an error occurspublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class Instruction
context
- The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathException
- if a dynamic error occurs during the evaluation
of the instructionpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in class Instruction
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Expression
protected StreamingAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class Expression
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.