@Override public void inject(InternalContext context, Object o) throws InternalProvisionException { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); try { methodInvoker.invoke(o, parameters); } catch (IllegalAccessException e) { throw new AssertionError(e); // a security manager is blocking us, we're hosed } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingMethod(cause).addSource(injectionPoint); } } }
@Override public void inject(InternalContext context, Object o) throws InternalProvisionException { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); try { methodInvoker.invoke(o, parameters); } catch (IllegalAccessException e) { throw new AssertionError(e); // a security manager is blocking us, we're hosed } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingMethod(cause).addSource(injectionPoint); } } }
@Override public void inject(InternalContext context, Object o) throws InternalProvisionException { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); try { methodInvoker.invoke(o, parameters); } catch (IllegalAccessException e) { throw new AssertionError(e); // a security manager is blocking us, we're hosed } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingMethod(cause).addSource(injectionPoint); } } }