public interface Function extends Item, Callable, GroundedValue
Modifier and Type | Method and Description |
---|---|
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
|
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
|
UnfailingIterator |
iterate()
Get an iterator over all the items in the sequence
|
XPathContext |
makeNewContext(XPathContext callingContext)
Prepare an XPathContext object for evaluating the function
|
atomize, getStringValue, getStringValueCS, head
effectiveBooleanValue, getLength, getStringValue, getStringValueCS, head, itemAt, reduce, subsequence
UnfailingIterator iterate()
iterate
in interface GroundedValue
iterate
in interface Sequence
boolean isMap()
boolean isArray()
FunctionItemType getFunctionItemType()
StructuredQName getFunctionName()
int getArity()
OperandRole[] getOperandRoles()
AnnotationList getAnnotations()
XPathContext makeNewContext(XPathContext callingContext)
callingContext
- the XPathContext of the function calling expressionSequence 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()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.