org.mmbase.util.functions
Class MethodFunction

java.lang.Object
  extended byorg.mmbase.util.functions.Function
      extended byorg.mmbase.util.functions.MethodFunction

public class MethodFunction
extends Function

A function based an an abritrary method. Since the name of the parameters cannot be found by reflection, this is only of limited use. Use BeanFunction.

Since:
MMBase-1.7
Version:
$Id: MethodFunction.java,v 1.1 2003/12/21 13:25:36 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List), Node.getFunctionValue(java.lang.String, java.util.List), org.mmbase.util.function.BeanFunction

Field Summary
 
Fields inherited from class org.mmbase.util.functions.Function
name, returnType
 
Constructor Summary
MethodFunction(java.lang.reflect.Method method, java.lang.String name)
           
 
Method Summary
static java.lang.reflect.Method getFirstMethod(java.lang.Class claz, java.lang.String name)
          Utility function
static Function getFunction(java.lang.reflect.Method method, java.lang.String name)
           
 java.lang.Object getFunctionValue(Parameters parameters)
          Executes the defined function supplying the given arguments.
 
Methods inherited from class org.mmbase.util.functions.Function
getDescription, getName, getNewParameters, getParameterDefinition, getReturnType, setDescription, setParameterDefinition, setReturnType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodFunction

public MethodFunction(java.lang.reflect.Method method,
                      java.lang.String name)
Method Detail

getFirstMethod

public static java.lang.reflect.Method getFirstMethod(java.lang.Class claz,
                                                      java.lang.String name)
Utility function


getFunction

public static Function getFunction(java.lang.reflect.Method method,
                                   java.lang.String name)

getFunctionValue

public java.lang.Object getFunctionValue(Parameters parameters)
Description copied from class: Function
Executes the defined function supplying the given arguments.

Specified by:
getFunctionValue in class Function
See Also:
Function.getNewParameters()


MMBase build 1.7.4.20050922