net.sf.saxon.expr
public class UserFunctionCall extends FunctionCall
Constructor Summary | |
---|---|
UserFunctionCall()
Create a function call to a user-written function in a query or stylesheet |
Method Summary | |
---|---|
PathMap.PathMapNodeSet | addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap. |
void | checkArguments(ExpressionVisitor visitor)
Method called during the type checking phase |
void | checkFunctionCall(UserFunction compiledFunction, ExpressionVisitor visitor)
Check the function call against the declared function signature |
void | computeArgumentEvaluationModes()
Compute the evaluation mode of each argument |
int | computeCardinality()
Determine the cardinality of the result |
protected int | computeSpecialProperties()
Compute the special properties of this expression. |
Expression | copy()
Copy an expression. |
ValueRepresentation | dynamicCall(ValueRepresentation[] suppliedArguments, XPathContext context)
Call the function dynamically. |
Item | evaluateItem(XPathContext c)
Call the function, returning the value as an item. |
void | evaluatePendingUpdates(XPathContext context, PendingUpdateList pul)
Evaluate an updating expression, adding the results to a Pending Update List.
|
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int[] | getArgumentEvaluationModes()
Get the evaluation modes that have been determined for each of the arguments |
Expression[] | getArguments()
Get the arguments (the expressions supplied in the function call) |
int | getConstructType() |
UserFunction | getFunction()
Get the function that is being called by this function call |
StructuredQName | getFunctionName()
Get the qualified of the function being called |
int | getImplementationMethod() |
int | getIntrinsicDependencies() |
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible |
int | getLineNumber(long locationId)
Get the line number within the document or module containing a particular location
|
StructuredQName | getObjectName() |
Object | getProperty(String name) |
String | getSystemId(long locationId)
Get the URI of the document or module containing a particular location
|
boolean | isConfirmed()
Determine whether this function call is confirmed |
boolean | isRecursiveTailCall()
Determine whether this is a recursive tail call |
boolean | isTailCall()
Determine whether this is a tail call (not necessarily a recursive tail call) |
boolean | isUpdatingExpression()
Determine whether this is an updating expression as defined in the XQuery update specification
|
SequenceIterator | iterate(XPathContext c)
Call the function, returning an iterator over the results. |
EventIterator | iterateEvents(XPathContext context)
Process the function call in pull mode |
int | markTailFunctionCalls(StructuredQName qName, int arity)
Mark tail-recursive calls on stylesheet functions. |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
Expression | preEvaluate(ExpressionVisitor visitor)
Pre-evaluate a function at compile time. |
void | process(XPathContext context)
Process the function call in push mode |
Expression | promote(PromotionOffer offer, Expression parent)
Promote this expression if possible |
void | setConfirmed(boolean conf)
Set this function as confirmed (the function being called is known to exist) or not |
void | setFunction(UserFunction compiledFunction)
Create the reference to the function to be called |
void | setStaticType(SequenceType type)
Set the static type |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
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.
Parameters: pathMap the PathMap to which the expression should be added pathMapNodeSet the PathMapNodeSet to which the paths embodied in this expression should be added
Returns: the pathMapNode representing the focus established by this expression, in the case where this expression is the first operand of a path expression or filter expression. For an expression that does navigation, it represents the end of the arc in the path map that describes the navigation route. For other expressions, it is the same as the input pathMapNode.
Parameters: compiledFunction the function being called visitor an expression visitor
Returns: the special properties, as a bit-significant integer
Returns: the copy of the original expression
Parameters: suppliedArguments the values to be used for the arguments of the function context the dynamic evaluation context
Returns: the result of evaluating the function
Parameters: context the XPath dynamic evaluation context pul the pending update list to which the results should be written
Returns: an array of integers representing the evaluation modes, one for each argument
Returns: the actual expressions used as arguments in the function call
Returns: the function being called
Returns: the qualified name
Parameters: th the type hierarchy cache
Returns: Type.ITEM (meaning not known in advance)
Parameters: locationId identifier of the location in question (as passed down the Receiver pipeline)
Returns: the line number within the document or module.
Parameters: locationId identifier of the location in question (as passed down the Receiver pipeline)
Returns: the URI of the document or module.
Returns: true if the function being called is known to exist
Returns: true if this function call is a recursive tail call
Returns: true if this function call is a tail call
Returns: true if this is an updating expression
Parameters: context the XPath dynamic context
Throws: XPathException
Parameters: visitor an expression visitor
Parameters: context the XPath dynamic context
Throws: XPathException
Parameters: conf true if the function being called is known to exist
Parameters: compiledFunction the function being called
Parameters: type the static type of the result of the function call