String name = ctr.getName();
throw new AssertionError("Constructor is not accessible [" + name + "]");
} catch (
InvocationTargetException e) {
String name = ctr.getName();
throw new ObjectCreationException("Exception thrown by constructor: " + name, e);
}
if (injectors != null) {
for (Injector<T> injector : injectors) {
//FIXME Injectors should never be null
if (injector != null)
try {
injector.inject(instance);
} catch (Exception e) {
if (destroyInvoker != null) {
destroyInvoker.invokeEvent(instance);
}
throw new ObjectCreationException("Exception invoking injector - " + e.getMessage(), e);
}
}
}
return new ReflectiveInstanceWrapper<T>(instance, initInvoker, destroyInvoker, callbackInjectors);