Here you can find the source of invoke(String cls_name, String method, Class>[] param_cls, Object cls, Object[] params)
public static Object invoke(String cls_name, String method, Class<?>[] param_cls, Object cls, Object[] params)
//package com.java2s; import java.lang.reflect.Method; public class Main { public static Object invoke(String cls_name, String method, Class<?>[] param_cls, Object cls, Object[] params) { try {/*from www . ja va 2 s . c o m*/ Class<?> c = Class.forName(cls_name); Method m = c.getMethod(method, param_cls); return m.invoke(cls, params); } catch (Exception e) { throw new RuntimeException(e); } } }