com.icl.saxon.expr
public class FunctionProxy extends Function
Constructor Summary | |
---|---|
FunctionProxy()
Constructor: creates an uncommitted FunctionProxy |
Method Summary | |
---|---|
static Value | convertJavaObjectToXPath(Object result, Controller controller)
Convert a Java object to an XPath value. |
NodeEnumeration | enumerate(Context context, boolean requireSorted) |
Value | evaluate(Context context)
Evaluate the function. |
boolean | evaluateAsBoolean(Context context) |
double | evaluateAsNumber(Context context) |
String | evaluateAsString(Context context) |
Object | getBestFit(Value[] argValues)
Get the best fit amongst all the candidate methods or constructors |
int | getDataType()
Determine the data type of the expression, if possible |
int | getDependencies()
Determine which aspects of the context the expression depends on. |
String | getName()
Get the name of the function |
Expression | reduce(int dependencies, Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies
on the context. |
boolean | setFunctionName(Class reqClass, String localName)
setFunctionName: locates the external class and the method (or candidate methods)
to which this function relates. |
Expression | simplify()
Simplify the function (by simplifying its arguments) |
Parameters: context The context in which the function is to be evaluated
Returns: a Value representing the result of the function.
Throws: XPathException if the function cannot be evaluated.
Returns: the result is either a Method or a Constructor. In JDK 1.2 these have a common superclass, AccessibleObject, but this is not available in JDK 1.1, which we still support.
Returns: Value.ANY (meaning not known in advance)
Parameters: dependencies The dependencies to be removed context The context to be used for the partial evaluation
Returns: a new expression that does not have any of the specified dependencies
The method is also used while calling function-available(). In this case the number of arguments is not known (it will be set to zero). We return true if a match was found, regardless of the number of arguments.
Parameters: reqClass The Java class name localName The local name used in the XPath function call
Returns: true if the function is available (with some number of arguments).