org.aksw.commons.util.reflect
Class MultiMethod

java.lang.Object
  extended by org.aksw.commons.util.reflect.MultiMethod

public class MultiMethod
extends Object


Constructor Summary
MultiMethod()
           
 
Method Summary
static
<T> Method
findInvocationMethod(Class<T> clazz, String name, Object... args)
           
static Object invoke(Object o, String name, Object... args)
           
static
<T> Object
invokeStatic(Class<T> clazz, String name, Object... args)
          Invoke the method of an object, that matches the name and arguments best.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiMethod

public MultiMethod()
Method Detail

invokeStatic

public static <T> Object invokeStatic(Class<T> clazz,
                                      String name,
                                      Object... args)
Invoke the method of an object, that matches the name and arguments best. TODO Add some caching mechanism

Type Parameters:
T -
Parameters:
clazz -
name -
args -
Throws:
InvocationTargetException
IllegalAccessException
IllegalArgumentException

invoke

public static Object invoke(Object o,
                            String name,
                            Object... args)

findInvocationMethod

public static <T> Method findInvocationMethod(Class<T> clazz,
                                              String name,
                                              Object... args)


Copyright © 2011. All Rights Reserved.