net.sf.saxon.functions

Class CompileTimeFunction

Implemented Interfaces:
EvaluableItem, InstructionInfoProvider, SequenceIterable, Serializable, SourceLocator
Known Direct Subclasses:
Data, DefaultCollation, StaticBaseURI, Unordered

public abstract class CompileTimeFunction
extends SystemFunction

Abtract class representing a function call that is always rewritten at compile-time: it can never be executed

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.Expression

EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD, locationId, staticProperties

Method Summary

Item
evaluateItem(XPathContext c)
Evaluate as a single item
SequenceIterator
iterate(XPathContext c)
Iterate over the results of the function
Expression
preEvaluate(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, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault

Methods inherited from class net.sf.saxon.expr.FunctionCall

addExternalFunctionCallToPathMap, checkArgumentCount, checkArguments, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, optimize, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck

Methods inherited from class net.sf.saxon.expr.Expression

addToPathMap, adoptChildExpression, checkPermittedContents, computeCardinality, computeDependencies, computeSpecialProperties, computeStaticProperties, copy, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, explain, explain, findParentOf, getCardinality, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getItemType, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterate, iterateEvents, iterateSubExpressions, markTailFunctionCalls, optimize, process, promote, replaceSubExpression, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, toString, typeCheck, typeError

Method Details

evaluateItem

public final Item evaluateItem(XPathContext c)
            throws XPathException
Evaluate as a single item
Specified by:
evaluateItem in interface EvaluableItem
Overrides:
evaluateItem in interface Expression

iterate

public final SequenceIterator iterate(XPathContext c)
Iterate over the results of the function
Specified by:
iterate in interface SequenceIterable
Overrides:
iterate in interface Expression

preEvaluate

public Expression preEvaluate(ExpressionVisitor visitor)
            throws XPathException
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 interface FunctionCall
Parameters:
visitor - an expression visitor