public static class UserFunctionReference.BoundUserFunction extends AbstractFunction implements ContextOriginator
| Constructor and Description |
|---|
BoundUserFunction(ExportAgent agent,
Function function,
Component component,
Controller controller) |
| Modifier and Type | Method and Description |
|---|---|
Sequence |
call(XPathContext context,
Sequence[] args)
Call the Callable.
|
void |
export(ExpressionPresenter out)
Output information about this function item to the diagnostic explain() output
|
AnnotationList |
getAnnotations()
Get the function annotations (as defined in XQuery).
|
int |
getArity()
Get the arity of the function
|
Controller |
getController() |
java.lang.String |
getDescription()
Get a description of this function for use in error messages.
|
FunctionItemType |
getFunctionItemType()
Get the item type of the function item
|
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous
|
Function |
getTargetFunction() |
XPathContext |
makeNewContext(XPathContext oldContext,
ContextOriginator originator)
Prepare an XPathContext object for evaluating the function
|
atomize, deepEquals, effectiveBooleanValue, getOperandRoles, getUnicodeStringValue, isArray, isMap, isTrustedResultType, simplify, toShortString, typeCheckclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGenre, isSequenceVariadicgetLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic BoundUserFunction(ExportAgent agent, Function function, Component component, Controller controller)
public Function getTargetFunction()
public Controller getController()
public XPathContext makeNewContext(XPathContext oldContext, ContextOriginator originator)
AbstractFunctionmakeNewContext in interface FunctionmakeNewContext in class AbstractFunctionoldContext - the XPathContext of the function calling expressionoriginator - the originator of the new contextpublic Sequence call(XPathContext context, Sequence[] args) throws XPathException
Callablecall in interface Callablecontext - the dynamic evaluation contextargs - 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 method
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 expressionpublic FunctionItemType getFunctionItemType()
FunctiongetFunctionItemType in interface Functionpublic AnnotationList getAnnotations()
FunctiongetAnnotations in interface FunctiongetAnnotations in class AbstractFunctionpublic StructuredQName getFunctionName()
FunctiongetFunctionName in interface Functionpublic int getArity()
Functionpublic java.lang.String getDescription()
FunctiongetDescription in interface Functionpublic void export(ExpressionPresenter out) throws XPathException
AbstractFunctionexport in interface Functionexport in class AbstractFunctionout - the destination for the informationXPathException - if things go wrongCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.