public class CallableFunction extends AbstractFunction
Constructor and Description |
---|
CallableFunction(int arity,
Callable callable,
FunctionItemType type) |
CallableFunction(SymbolicName.F name,
Callable callable,
FunctionItemType type) |
Modifier and Type | Method and Description |
---|---|
Sequence<?> |
call(XPathContext context,
Sequence[] args)
Invoke the function
|
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
|
Callable |
getCallable() |
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
|
void |
setAnnotations(AnnotationList annotations) |
void |
setCallable(Callable callable) |
void |
setType(FunctionItemType type) |
atomize, deepEquals, effectiveBooleanValue, getOperandRoles, getStringValue, getStringValueCS, isArray, isMap, isTrustedResultType, makeNewContext, simplify, typeCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
argumentArray, getGenre, toShortString
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public CallableFunction(SymbolicName.F name, Callable callable, FunctionItemType type)
public CallableFunction(int arity, Callable callable, FunctionItemType type)
public Callable getCallable()
public void setCallable(Callable callable)
public void setType(FunctionItemType type)
public FunctionItemType getFunctionItemType()
public StructuredQName getFunctionName()
public java.lang.String getDescription()
public int getArity()
public void setAnnotations(AnnotationList annotations)
public AnnotationList getAnnotations()
Function
getAnnotations
in interface Function
getAnnotations
in class AbstractFunction
public Sequence<?> call(XPathContext context, Sequence[] args) throws XPathException
context
- the XPath dynamic evaluation contextargs
- the actual arguments to be suppliedXPathException
- if a dynamic error occurs within the functionpublic void export(ExpressionPresenter out)
export
in interface Function
export
in class AbstractFunction
out
- the destination for the outputCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.