public Object invoke(Object[] argumentArray) { Constructor constr = cachedConstructor; try { return constr.newInstance(argumentArray); } catch (InvocationTargetException e) { throw e.getCause() instanceof RuntimeException ? (RuntimeException)e.getCause() : new InvokerInvocationException(e); } catch (IllegalArgumentException e) { throw createException("failed to invoke constructor: ", constr, argumentArray, e, false); } catch (IllegalAccessException e) { throw createException("could not access constructor: ", constr, argumentArray, e, false); } catch (Exception e) { if (e instanceof RuntimeException) throw (RuntimeException)e; else throw createException("failed to invoke constructor: ", constr, argumentArray, e, true); } }