Java Reflection Method Invoke invoke(Method m, Object target, Object... params)

Here you can find the source of invoke(Method m, Object target, Object... params)

Description

invoke

License

Apache License

Declaration

public static Object invoke(Method m, Object target, Object... params) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.lang.reflect.Method;

public class Main {

    public static Object invoke(Method m, Object target, Object... params) {
        try {/*from w w  w.  ja  va 2s .  c o  m*/
            m.setAccessible(true);
            return m.invoke(target, params);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. invoke(Method m, Object o, Object[] args)
  2. invoke(Method m, Object o, String msg, Object... parameters)
  3. invoke(Method method)
  4. invoke(Method method)
  5. invoke(Method method, Object data, Object... arguments)
  6. invoke(Method method, Object instance, Object... parameters)