public interface Function extends Item, Callable, GroundedValue
Modifier and Type | Method and Description |
---|---|
static Sequence[] |
argumentArray(Sequence... args) |
Sequence |
call(XPathContext context,
Sequence[] args)
Invoke the function
|
boolean |
deepEquals(Function other,
XPathContext context,
AtomicComparer comparer,
int flags)
Test whether this FunctionItem is deep-equal to another function item,
under the rules of the deep-equal 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
|
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
|
default Genre |
getGenre()
Get the genre of this item
|
OperandRole[] |
getOperandRoles()
Get the roles of the arguments, for the purposes of streaming
|
boolean |
isArray()
Ask whether this function item is an array
|
boolean |
isMap()
Ask whether this function item is a map
|
boolean |
isTrustedResultType()
Check that result type is of the trusted system functions to return a result of the correct type
|
XPathContext |
makeNewContext(XPathContext callingContext,
ContextOriginator originator)
Prepare an XPathContext object for evaluating the function
|
default java.lang.String |
toShortString()
Provide a short string showing the contents of the item, suitable
for use in error messages
|
atomize, getLength, getStringValue, getStringValueCS, head, isStreamed, itemAt, iterate, reduce, subsequence, toGroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materialize
makeRepeatable
boolean isMap()
boolean isArray()
FunctionItemType getFunctionItemType()
StructuredQName getFunctionName()
int getArity()
OperandRole[] getOperandRoles()
AnnotationList getAnnotations()
XPathContext makeNewContext(XPathContext callingContext, ContextOriginator originator)
callingContext
- the XPathContext of the function calling expressionoriginator
- identifies the location of the caller for diagnosticsSequence call(XPathContext context, Sequence[] args) throws XPathException
call
in interface Callable
context
- the XPath dynamic evaluation contextargs
- the actual arguments to be suppliedXPathException
- if a dynamic error occurs within the functionboolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags) throws XPathException
other
- the other function itemcontext
- the dynamic evaluation contextcomparer
- the object to perform the comparisonflags
- options for how the comparison is performedXPathException
- if the comparison cannot be performedjava.lang.String getDescription()
void export(ExpressionPresenter out) throws XPathException
XPathException
boolean isTrustedResultType()
default java.lang.String toShortString()
toShortString
in interface GroundedValue
toShortString
in interface Item
default Genre getGenre()
getGenre
in interface Item
Genre.FUNCTION
. Overridden for maps and arrays.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.