public abstract class AbstractStringFunction extends FunctionResolver.AbstractSelfDescribingFunction
evaluate(java.util.List)
,
and provides a helper method to convert other arguments.Modifier | Constructor and Description |
---|---|
protected |
AbstractStringFunction(String nsUri,
String localName)
Constructor for a function that takes a single argumment.
|
protected |
AbstractStringFunction(String nsUri,
String localName,
int numArgs)
Constructor for a function that has a fixed number of arguments.
|
protected |
AbstractStringFunction(String nsUri,
String localName,
int minArgs,
int maxArgs)
Constructor for a function that has a variable number of arguments.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
convertToString(Object arg)
Converts the passed object to a string, applying the same rules used for the
built-in string()
function.
|
Object |
evaluate(List args) |
abstract Object |
evaluate(String value,
List<?> args)
Subclasses must implement this method.
|
compareTo, equals, getMaxArgCount, getMinArgCount, getName, getNamespaceUri, getQName, hashCode, isArityMatch, isMatch
protected AbstractStringFunction(String nsUri, String localName)
protected AbstractStringFunction(String nsUri, String localName, int numArgs)
public final Object evaluate(List args) throws XPathFunctionException
XPathFunctionException
public abstract Object evaluate(String value, List<?> args)