// The main class is added last so it can override any bindings from the BootstrapModule's and LifecycleInjectorBuilderSuite's
if (Module.class.isAssignableFrom(main)) {
try {
builder.withAdditionalModuleClasses(main);
} catch (Exception e) {
throw new ProvisionException(String.format("Failed to create module for main class '%s'", main.getName()), e);
}
}
// Finally, create and return the injector
return builder.build().createInjector();