Here you can find the source of invokeAnUnwrapException(final Method method, final Object[] args, final Object target)
public static Object invokeAnUnwrapException(final Method method, final Object[] args, final Object target) throws Throwable
//package com.java2s; //License from project: LGPL import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class Main { public static Object invokeAnUnwrapException(final Method method, final Object[] args, final Object target) throws Throwable { try {//from w w w . j a v a2s . co m return method.invoke(target, args); } catch (InvocationTargetException ite) { throw ite.getTargetException(); } } }