Here you can find the source of invoke(Object bean, Method method, Object value)
private static void invoke(Object bean, Method method, Object value) throws Exception
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { private static void invoke(Object bean, Method method, Object value) throws Exception { Object[] values = { value }; invoke(bean, method, values);/*from w w w . java 2 s . c o m*/ } private static Object invoke(Object object, Method method, Object[] values) throws Exception { try { return method.invoke(object, values); } catch (Exception e) { throw new Exception(method.getName(), e); } } }