net.ranides.assira.reflection
Class Invoker

java.lang.Object
  extended by net.ranides.assira.reflection.Invoker

public final class Invoker
extends Object

Author:
ranides

Method Summary
static Object invoke(Object object, Method method, Object... arguments)
          Wywołuje na rzecz obiektu podaną metodę.
static Object invoke(Object object, String methodName, Object... arguments)
          Wywołuje na rzecz obiektu metodę o podanej nazwie.
static Object invokeLocal(Object object, String methodName, Object... arguments)
           
static Object invokeStatic(Class<?> clazz, String function, Object... args)
           
static Object invokeStatic(String className, String function, Object... args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

public static Object invoke(Object object,
                            Method method,
                            Object... arguments)
                     throws InspectException
Wywołuje na rzecz obiektu podaną metodę. Jeśli metoda jest prywatna, również stara się ją wywołać. Potencjalne błędy wykonania opakowuje w odpowiedni wyjątek IBusException

Parameters:
object -
method -
arguments -
Returns:
Throws:
InspectException

invoke

public static Object invoke(Object object,
                            String methodName,
                            Object... arguments)
                     throws InspectException
Wywołuje na rzecz obiektu metodę o podanej nazwie. Jeśli metoda jest prywatna, również stara się ją wywołać. Potencjalne błędy wykonania opakowuje w odpowiedni wyjątek InspectException

Parameters:
object -
methodName -
arguments -
Returns:
Throws:
InspectException

invokeStatic

public static Object invokeStatic(Class<?> clazz,
                                  String function,
                                  Object... args)
                           throws InspectException
Throws:
InspectException

invokeStatic

public static Object invokeStatic(String className,
                                  String function,
                                  Object... args)
                           throws InspectException
Throws:
InspectException

invokeLocal

public static Object invokeLocal(Object object,
                                 String methodName,
                                 Object... arguments)
                          throws InspectException
Throws:
InspectException


Copyright © 2013. All Rights Reserved.