Here you can find the source of invoke(Method method, T instance, Object... params)
static public <T> Object invoke(Method method, T instance, Object... params)
//package com.java2s; import java.lang.reflect.Method; public class Main { static public <T> Object invoke(Method method, T instance, Object... params) { try {/*from w w w . j a v a 2 s.c o m*/ if (params == null) { return method.invoke(instance); } else { return method.invoke(instance, params); } } catch (Exception e) { return null; //throw new ClassUtilsException(e); } } }