Package net.sf.saxon.functions
Class CompileTimeFunction
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.CompileTimeFunction
- All Implemented Interfaces:
Serializable,SourceLocator,LocationProvider,SaxonLocator,InstructionInfo,Locator
- Direct Known Subclasses:
Current,Data,DefaultCollation,StaticBaseURI,Unordered
Abtract class representing a function call that is always rewritten at compile-time:
it can never be executed
- See Also:
-
Field Summary
Fields inherited from class net.sf.saxon.functions.SystemFunction
operationFields inherited from class net.sf.saxon.expr.FunctionCall
argumentFields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ItemEvaluate as a single itemfinal SequenceIteratorIterate over the results of the functionpreEvaluate(ExpressionVisitor visitor) preEvaluate: this method suppresses compile-time evaluation by doing nothing.Methods inherited from class net.sf.saxon.functions.SystemFunction
addContextDocumentArgument, addDocToPathMap, checkArguments, computeCardinality, computeSpecialProperties, copy, equals, getDetails, getErrorCodeForTypeErrors, getImplementationMethod, getItemType, getOperation, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefaultMethods inherited from class net.sf.saxon.expr.FunctionCall
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheckMethods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
Constructor Details
-
CompileTimeFunction
public CompileTimeFunction()
-
-
Method Details
-
preEvaluate
preEvaluate: this method suppresses compile-time evaluation by doing nothing. (this is because the default implementation of preEvaluate() calls evaluate() which is not available for these functions)- Overrides:
preEvaluatein classFunctionCall- Parameters:
visitor- an expression visitor- Returns:
- the result of the early evaluation, or the original expression, or potentially a simplified expression
- Throws:
XPathException- if evaluation fails
-
evaluateItem
Evaluate as a single item- Overrides:
evaluateItemin classExpression- Parameters:
c- The context in which the expression is to be evaluated- Returns:
- the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
- Throws:
XPathException- if any dynamic error occurs evaluating the expression
-
iterate
Iterate over the results of the function- Overrides:
iteratein classExpression- Parameters:
c- supplies the context for evaluation- Returns:
- a SequenceIterator that can be used to iterate over the result of the expression
-