Package net.sf.saxon.expr
Class DraftExpression
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.DraftExpression
- All Implemented Interfaces:
ExportAgent,Locatable,IdentityComparable,Traceable
- Direct Known Subclasses:
DraftFunctionCall,DraftFunctionReference
A DraftExpression is a temporary expression constructed in the course of parsing, that must
be substituted by a real expression before it can be evaluated. It is used, for example, for
functions calls whose names cannot yet be resolved to an actual function
-
Field Summary
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, UPDATE_METHOD, WATCH_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intCompute the special properties of this expression.Determine the static item type of the expression, as precisely possible.Get the static type of the expression as a SequenceType: this is the combination of the item type and the cardinality.getStaticUType(UType contextItemType) Get the static type of the expression as a UType, following precisely the type inference rules defined in the XSLT 3.0 specification.Methods inherited from class net.sf.saxon.expr.Expression
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeCardinality, computeDependencies, computeHashCode, computeStaticProperties, copy, dispatchTailCall, dynamicError, effectiveBooleanValue, equals, evaluateAsString, evaluateItem, explain, export, getCardinality, getConfiguration, getCost, getDependencies, getElaborator, getEvaluationMethod, getExpressionName, getExtraProperty, getImplementationMethod, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, makeElaborator, markTailFunctionCalls, operandList, operands, operandSparseList, optimize, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, supportsLazyEvaluation, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, warning, withLocationMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
Constructor Details
-
DraftExpression
public DraftExpression()
-
-
Method Details
-
getItemType
Description copied from class:ExpressionDetermine the static item type of the expression, as precisely possible. All expression return sequences, in general; this method determines the type of the items within the sequence, assuming that (a) this is known in advance, and (b) it is the same for all items in the sequence.This method should always return a result, though it may be the best approximation that is available at the time.
- Specified by:
getItemTypein classExpression- Returns:
- a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)
-
getStaticType
Description copied from class:ExpressionGet the static type of the expression as a SequenceType: this is the combination of the item type and the cardinality.- Overrides:
getStaticTypein classExpression- Returns:
- the static type of the expression
-
getStaticUType
Description copied from class:ExpressionGet the static type of the expression as a UType, following precisely the type inference rules defined in the XSLT 3.0 specification.- Overrides:
getStaticUTypein classExpression- Parameters:
contextItemType- the static type of the context item- Returns:
- the static item type of the expression according to the XSLT 3.0 defined rules
-
computeSpecialProperties
protected int computeSpecialProperties()Compute the special properties of this expression. These properties are denoted by a bit-significant integer, possible values are in classStaticProperty. The "special" properties are properties other than cardinality and dependencies, and most of them relate to properties of node sequences, for example whether the nodes are in document order.- Overrides:
computeSpecialPropertiesin classExpression- Returns:
- the special properties, as a bit-significant integer
-