Java Reflection Method Invoke invoke(Method method, Object obj, Object... args)

Here you can find the source of invoke(Method method, Object obj, Object... args)

Description

invoke

License

Open Source License

Declaration

private static Object invoke(Method method, Object obj, Object... args) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Main {
    private static Object invoke(Method method, Object obj, Object... args) {
        try {/*from   www. j  a va2  s.  co  m*/
            return method.invoke(obj, args);
        } catch (IllegalAccessException e) {
            throw new IllegalArgumentException("Can't invoke method " + method.getName(), e);
        } catch (InvocationTargetException e) {
            throw new IllegalArgumentException("Can't invoke method " + method.getName(), e);
        }
    }
}

Related

  1. invoke(Method method)
  2. invoke(Method method, Object data, Object... arguments)
  3. invoke(Method method, Object instance, Object... parameters)
  4. invoke(Method method, Object it, Object... args)
  5. invoke(Method method, Object javaBean, Object value)
  6. invoke(Method method, Object obj, Object... args)
  7. invoke(Method method, Object object, Object... args)
  8. invoke(Method method, Object object, Object... arguments)
  9. invoke(Method method, Object object, Object... arguments)