Java Method Call invoke(Object bean, Method method, Object value)

Here you can find the source of invoke(Object bean, Method method, Object value)

Description

invoke

License

Open Source License

Declaration

private static void invoke(Object bean, Method method, Object value) throws Exception 

Method Source Code

//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);
        }
    }
}

Related

  1. invoke(final Object object, final String methodName, final Class[] methodParamTypes, final Object[] methodParamValues)
  2. invoke(final Object target, final Method method, final Object... parameters)
  3. invoke(final Object target, final Method method, final Object[] params)
  4. invoke(Object _o, String _method, Object... _args)
  5. invoke(Object bean, Method method, Object value)
  6. invoke(Object bean, String methodName, Object args, Class parameterType)
  7. invoke(Object buffer, String methodName, Class[] paramTypes, Object... args)
  8. invoke(Object clazzInstance, String method, Class[] paramClasses, Object[] params)
  9. invoke(Object context, String methodName, Object parameter)