/** * Creates an injector using modules obtained from the following sources: (1) the hard coded list of modules * specified in the {@link GuiceInjectorProvider #getModulesList()} method of this class, (2) the 'modules' * list passed as the first and only argument to this method * * @param modules - any additional Guice binding modules which will supplement the list of those added by default */ public Injector getInjector(AbstractModule ... modules) { List<Module> moduleList = getModuleList(modules); Injector injector = Guice.createInjector(moduleList); injector.getInstance(IConfiguration.class).initialize(); return injector; } }
/** * Creates an injector using modules obtained from the following sources: (1) the hard coded list of modules * specified in the {@link GuiceInjectorProvider #getModulesList()} method of this class, (2) the 'modules' * list passed as the first and only argument to this method * * @param modules - any additional Guice binding modules which will supplement the list of those added by default */ public Injector getInjector(AbstractModule ... modules) { List<Module> moduleList = getModuleList(modules); Injector injector = Guice.createInjector(moduleList); injector.getInstance(IConfiguration.class).initialize(); return injector; } }