Here you can find the source of invokeTarget(Method method, Object obj, Object... args)
static Object invokeTarget(Method method, Object obj, Object... args) throws Throwable
//package com.java2s; //License from project: Apache License import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class Main { static Object invokeTarget(Method method, Object obj, Object... args) throws Throwable { try {//from w w w . j a v a 2 s. com return method.invoke(obj, args); } catch (InvocationTargetException e) { throw e.getCause(); } } }