public class XPathFunctionCall extends FunctionCall implements Callable
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
XPathFunctionCall(StructuredQName name,
javax.xml.xpath.XPathFunction function)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
PathMap.PathMapNodeSet |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap.
|
Sequence |
call(XPathContext context,
Sequence[] argValues)
Call an extension function previously identified using the bind() method.
|
int |
computeCardinality()
Determine the cardinality of the result
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
StructuredQName |
getFunctionName()
Get the qualified of the function being called
|
int |
getIntrinsicDependencies()
Determine which aspects of the context the expression depends on.
|
ItemType |
getItemType()
Determine the data type of the expression, if possible.
|
Function |
getTargetFunction(XPathContext context)
Get the target function to be called
|
SequenceIterator |
iterate(XPathContext context)
Evaluate the function.
|
Expression |
preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
(because the external function might have side-effects and might use the context)
|
addExternalFunctionCallToPathMap, adjustRequiredType, checkArgumentCount, checkArguments, checkFunctionCall, computeHashCode, equals, evaluateArguments, export, getArg, getArguments, getArity, getDisplayName, getExpressionName, getImplementationMethod, getNetCost, getOperanda, operands, optimize, pluralArguments, preEvaluateIfConstant, setArg, setArguments, setOperanda, setOperanda, simplifyArguments, toShortString, toString, typeCheck
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public XPathFunctionCall(StructuredQName name, javax.xml.xpath.XPathFunction function)
public StructuredQName getFunctionName()
getFunctionName
in class FunctionCall
public Function getTargetFunction(XPathContext context) throws XPathException
getTargetFunction
in class FunctionCall
context
- the dynamic evaluation contextXPathException
- if the target function cannot be determinedpublic Expression preEvaluate(ExpressionVisitor visitor)
preEvaluate
in class FunctionCall
visitor
- an expression visitorpublic int getIntrinsicDependencies()
getIntrinsicDependencies
in class Expression
public Expression copy(RebindingMap rebindings)
copy
in class Expression
rebindings
- public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
The default implementation of this method assumes that an expression does no navigation other than the navigation done by evaluating its subexpressions, and that the subexpressions are evaluated in the same context as the containing expression. The method must be overridden for any expression where these assumptions do not hold. For example, implementations exist for AxisExpression, ParentExpression, and RootExpression (because they perform navigation), and for the doc(), document(), and collection() functions because they create a new navigation root. Implementations also exist for PathExpression and FilterExpression because they have subexpressions that are evaluated in a different context from the calling expression.
addToPathMap
in class Expression
pathMap
- the PathMap to which the expression should be addedpathMapNodeSet
- public SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in class FunctionCall
context
- The context in which the function is to be evaluatedXPathException
- if the function cannot be evaluated.public Sequence call(XPathContext context, Sequence[] argValues) throws XPathException
call
in interface Callable
context
- The XPath dynamic contextargValues
- The values of the argumentsXPathException
- if a dynamic error occurs during the evaluation of the expressionpublic ItemType getItemType()
This method will always return a result, though it may be the best approximation that is available at the time.
getItemType
in class Expression
public int computeCardinality()
computeCardinality
in class Expression
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.