public class OnNonEmptyExpr extends UnaryExpression
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 |
---|
OnNonEmptyExpr(Expression base)
Create the instruction
|
Modifier and Type | Method and Description |
---|---|
Expression |
copy()
Copy an expression.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the OnEmpty expression
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int |
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived
from the dependencies of its subexpressions.
|
protected OperandRole |
getOperandRole()
Get the usage (in terms of streamability analysis) of the single operand
|
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.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform optimisation of an expression and its subexpressions.
|
void |
process(XPathContext context)
Process the instruction, without returning any tail calls
|
void |
setAtEnd(boolean atEnd)
Say whether this instruction is at the end of the containing sequence constructor, in the sense
that the only following instructions are xsl:on-empty or xsl:on-non-empty instructions
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression.
|
computeCardinality, computeSpecialProperties, displayOperator, equals, getBaseExpression, getItemType, getOperand, hashCode, operands, setBaseExpression, toShortString, toString
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExpressionName, getHostLanguage, getIntegerBounds, getLocation, getNetCost, 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, promote, promoteChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeCheckChildren, typeError, unordered
public OnNonEmptyExpr(Expression base)
public void setAtEnd(boolean atEnd)
atEnd
- true if this instruction has no ordinary following instructionsprotected OperandRole getOperandRole()
getOperandRole
in class UnaryExpression
public Expression copy()
Expression
copy
in class Expression
public int getIntrinsicDependencies()
getIntrinsicDependencies
in class Expression
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 Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) 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 UnaryExpression
visitor
- an expression visitorcontextInfo
- 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 int getImplementationMethod()
getImplementationMethod
in class Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public 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 SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in class Expression
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Expression
public void export(ExpressionPresenter out)
UnaryExpression
export
in class UnaryExpression
out
- the expression presenter used to display the structureprotected StreamingAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class Expression
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.