public static interface FunctionResolver.SelfDescribingFunction extends XPathFunction, Comparable<FunctionResolver.SelfDescribingFunction>
Implementations must implement Comparable
to allow the
function resolver to pick the most appropriate instance for a specific
invocation. The primary issue is with arity, so any comparator must
follow these rules:
Modifier and Type | Method and Description |
---|---|
int |
getMaxArgCount()
Returns the maximum number of arguments handled by this function.
|
int |
getMinArgCount()
Returns the minimum number of arguments handled by this function.
|
String |
getName()
Returns the name of this function.
|
String |
getNamespaceUri()
Returns the namespace URI for this function.
|
QName |
getQName()
Returns the qualified name of this function, consisting of name and
namespace (but not prefix).
|
boolean |
isArityMatch(int arity)
Determines whether this function can handle the specified number of
arguments.
|
boolean |
isMatch(QName qname,
int arity)
Determines whether this function is a match for a call to
XPathFunctionResolver.resolveFunction() . |
evaluate
compareTo
QName getQName()
String getNamespaceUri()
String getName()
int getMinArgCount()
int getMaxArgCount()
boolean isMatch(QName qname, int arity)
XPathFunctionResolver.resolveFunction()
.boolean isArityMatch(int arity)