public class OnNonEmptyExpr extends UnaryExpression
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 |
|---|
OnNonEmptyExpr(Expression base)
Create the instruction
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowExtractingCommonSubexpressions()
Ask whether common subexpressions found in the operands of this expression can
be extracted and evaluated outside the expression itself.
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
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().
|
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
|
java.lang.String |
getStreamerName()
Get the (partial) name of a class that supports streaming of this kind of expression
|
boolean |
isInstruction()
Ask whether this expression is an instruction.
|
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
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression.
|
computeCardinality, computeHashCode, computeSpecialProperties, displayOperator, equals, getBaseExpression, getItemType, getOperand, operands, setBaseExpression, toShortString, toStringaddToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointerspublic OnNonEmptyExpr(Expression base)
public boolean isInstruction()
isInstruction in class Expressionprotected OperandRole getOperandRole()
getOperandRole in class UnaryExpressionpublic Expression copy(RebindingMap rebindings)
Expressioncopy in class Expressionrebindings - a mutable list of (old binding, new binding) pairs
that is used to update the bindings held in any
local variable references that are copied.public int getIntrinsicDependencies()
getIntrinsicDependencies in class Expressionpublic boolean allowExtractingCommonSubexpressions()
allowExtractingCommonSubexpressions in class Expressionpublic Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck in class UnaryExpressionvisitor - 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 UnaryExpressionvisitor - 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_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public int getImplementationMethod()
getImplementationMethod in class ExpressionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic void process(XPathContext context) throws XPathException
process in class Expressioncontext - 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 Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic java.lang.String getExpressionName()
getExpressionName in class Expressionpublic void export(ExpressionPresenter out) throws XPathException
UnaryExpressionexport in interface ExportAgentexport in class UnaryExpressionout - the expression presenter used to display the structureXPathException - if the export fails, for example if an expression is found that won't work
in the target environment.public java.lang.String getStreamerName()
getStreamerName in class ExpressionCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.