Package net.sf.saxon.expr
Class EagerLetExpression
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.Assignation
net.sf.saxon.expr.LetExpression
net.sf.saxon.expr.EagerLetExpression
- All Implemented Interfaces:
Binding
,ExportAgent
,LocalBinding
,Locatable
,IdentityComparable
,Traceable
An EagerLetExpression is the same as a LetExpression except that the variable is evaluated using
eager evaluation rather than lazy evaluation. This is used when performing diagnostic tracing.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.expr.LetExpression
LetExpression.LetExprElaborator
-
Field Summary
Fields inherited from class net.sf.saxon.expr.Assignation
hasLoopingReference, indexedVariable, references, requiredType, slotNumber, variableName
Fields inherited from class net.sf.saxon.expr.Expression
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoptimize
(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) Perform optimisation of an expression and its subexpressions.Methods inherited from class net.sf.saxon.expr.LetExpression
checkPermittedContents, computeCardinality, computeSpecialProperties, copy, effectiveBooleanValue, eval, evaluateItem, export, gatherProperties, getCost, getElaborator, getEvaluator, getExpressionName, getImplementationMethod, getIntegerBounds, getItemType, getStaticUType, implementsStaticTypeCheck, isInstruction, isLiftable, isNeedsEagerEvaluation, isNeedsLazyEvaluation, isVacuousExpression, iterate, markTailFunctionCalls, process, resetLocalStaticProperties, setEvaluator, setEvaluator, setInstruction, setNeedsEagerEvaluation, setNeedsLazyEvaluation, staticTypeCheck, supportsLazyEvaluation, toShortString, toString, typeCheck
Methods inherited from class net.sf.saxon.expr.Assignation
addReference, addToPathMap, checkForUpdatingSubexpressions, computeDependencies, evaluateVariable, getAction, getActionOp, getIntegerBoundsForVariable, getLocalSlotNumber, getNominalReferenceCount, getObjectName, getRequiredSlots, getRequiredType, getSequence, getSequenceOp, getVariableEQName, getVariableName, getVariableQName, hasVariableBinding, isAssignable, isGlobal, isIndexedVariable, isUpdatingExpression, operands, rebuildReferenceList, refineTypeInformation, removeDeadReferences, replaceVariable, setAction, setIndexedVariable, setRequiredType, setSequence, setSlotNumber, setVariableQName, suppressValidation, unordered, verifyReferences
Methods inherited from class net.sf.saxon.expr.Expression
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, computeHashCode, computeStaticProperties, dispatchTailCall, dynamicError, equals, evaluateAsString, explain, getCardinality, getConfiguration, getDependencies, getEvaluationMethod, getExtraProperty, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, identityHashCode, isCallOn, isEqual, isIdentical, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, makeElaborator, operandList, operandSparseList, optimizeChildren, prepareForStreaming, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, toPattern, typeCheckChildren, typeError, verifyParentPointers, withLocation
-
Constructor Details
-
EagerLetExpression
public EagerLetExpression()
-
-
Method Details
-
optimize
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException Description copied from class:LetExpression
Perform optimisation of an expression and its subexpressions.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.
- Overrides:
optimize
in classLetExpression
- Parameters:
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 toType.ITEM_TYPE
- Returns:
- the original expression, rewritten if appropriate to optimize execution
- Throws:
XPathException
- if an error is discovered during this phase (typically a type error)
-