public class IntegratedFunctionCall extends FunctionCall implements Callable
ExtensionFunctionCallargumentEFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD| Constructor and Description |
|---|
IntegratedFunctionCall(ExtensionFunctionCall function) |
| Modifier and Type | Method and Description |
|---|---|
Sequence |
call(XPathContext context,
Sequence[] arguments)
Call the Callable.
|
void |
checkArguments(ExpressionVisitor visitor)
Method supplied by each class of function to check arguments during parsing, when all
the argument expressions have been read.
|
protected int |
computeCardinality()
Compute the static cardinality of this expression
|
protected int |
computeSpecialProperties()
Compute the special properties of this expression.
|
Expression |
copy()
Copy an expression.
|
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression.
|
Container |
getContainer()
Get the container in which this expression is located.
|
ExtensionFunctionCall |
getFunction()
Get the ExtensionFunctionCall object supplied by the application
|
int |
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived
from the dependencies of its subexpressions.
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible.
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
Expression |
preEvaluate(ExpressionVisitor visitor)
Pre-evaluate a function at compile time.
|
void |
setContainer(Container container)
Mark an expression as being in a given Container.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Type-check the expression.
|
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, optimize, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toStringaddToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getDependencies, getEvaluationMethod, getExecutable, getExpressionCompiler, getHostLanguage, getImplementationMethod, getIntegerBounds, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSubExpressionInfo, markTailFunctionCalls, process, resetLocalStaticProperties, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeErrorpublic IntegratedFunctionCall(ExtensionFunctionCall function)
public ExtensionFunctionCall getFunction()
public Container getContainer()
getContainer in class Expressionpublic void setContainer(Container container)
This affects the expression and all its subexpressions. Any subexpressions that are not in the same container are marked with the new container, and this proceeds recursively. However, any subexpression that is already in the correct container is not modified.
setContainer in class Expressioncontainer - The container of this expression.public void checkArguments(ExpressionVisitor visitor) throws XPathException
checkArguments in class FunctionCallvisitor - the expression visitorXPathException - if the arguments are statically determined to be incompatible
with the declared argument types of the function.public Expression typeCheck(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
typeCheck in class FunctionCallvisitor - an expression visitorcontextItemType - the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException
preEvaluate in class FunctionCallvisitor - an expression visitorXPathException - if evaluation failspublic ItemType getItemType(TypeHierarchy th)
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType in class Expressionth - the type hierarchy cacheprotected int computeCardinality()
computeCardinality in class ExpressionStaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE,
StaticProperty.ALLOWS_ZERO_OR_MOREpublic int getIntrinsicDependencies()
getIntrinsicDependencies in class Expressionprotected int computeSpecialProperties()
StaticProperty. 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.computeSpecialProperties in class Expressionpublic Expression copy()
copy in class Expressionpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext context) throws XPathException
effectiveBooleanValue in class Expressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
Callablecall in interface Callablecontext - the dynamic evaluation contextarguments - the values of the arguments, supplied as Sequences.
Generally it is advisable, if calling iterate() to process a supplied sequence, to
call it only once; if the value is required more than once, it should first be converted
to a GroundedValue by calling the utility methd
SequenceTool.toGroundedValue().
If the expected value is a single item, the item should be obtained by calling
Sequence.head(): it cannot be assumed that the item will be passed as an instance of
Item or AtomicValue.
It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable.
XPathException - if a dynamic error occurs during the evaluation of the expressionCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.