org.apache.commons.jxpath.functions

Class MethodFunction

Implemented Interfaces:
Function

public class MethodFunction
extends java.lang.Object
implements Function

An XPath extension function implemented as an individual Java method.
Version:
$Revision: 1.11 $ $Date: 2004/02/29 14:17:44 $
Author:
Dmitri Plotnikov

Constructor Summary

MethodFunction(Method method)

Method Summary

Object
invoke(ExpressionContext context, Object[] parameters)
Computes the value of the function.
String
toString()

Constructor Details

MethodFunction

public MethodFunction(Method method)

Method Details

invoke

public Object invoke(ExpressionContext context,
                     Object[] parameters)
Computes the value of the function. Each implementation of Function is responsible for conversion of supplied parameters to the required argument types.
Specified by:
invoke in interface Function
Parameters:
context - can be used to acquire the context in which the function is being evaluted.

toString

public String toString()