Package net.sf.saxon.functions
Class CompileTimeFunction
java.lang.Object
net.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.CompileTimeFunction
- All Implemented Interfaces:
Serializable
,SourceLocator
,Container
,Expression
,InstructionInfoProvider
- Direct Known Subclasses:
Data
,DefaultCollation
,Reverse
,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
operation
Fields inherited from class net.sf.saxon.expr.FunctionCall
argument
Fields inherited from class net.sf.saxon.expr.ComputedExpression
locationId, staticProperties
Fields inherited from interface net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Item
Evaluate as a single itemfinal SequenceIterator
Iterate over the results of the functionpreEvaluate
(StaticContext env) preEvaluate: this method suppresses compile-time evaluation by doing nothing.Methods inherited from class net.sf.saxon.functions.SystemFunction
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault
Methods inherited from class net.sf.saxon.expr.FunctionCall
checkArgumentCount, getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, simplifyArguments, typeCheck
Methods inherited from class net.sf.saxon.expr.ComputedExpression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, 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:
preEvaluate
in classFunctionCall
- Throws:
XPathException
-
evaluateItem
Evaluate as a single item- Specified by:
evaluateItem
in interfaceExpression
- Overrides:
evaluateItem
in classComputedExpression
- 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- Specified by:
iterate
in interfaceExpression
- Overrides:
iterate
in classComputedExpression
- Parameters:
c
- supplies the context for evaluation- Returns:
- a SequenceIterator that can be used to iterate over the result of the expression
-