T - the kind of application module expected by the InjectorFactory. The application module provides the required information of the runtime environmentS - the kind of application which shall be created by this InjectorFactoryFpublic class InjectorFactory<T extends ApplicationModule,S extends IApplication> extends Object
| Constructor and Description |
|---|
InjectorFactory(com.google.inject.Module... modules) |
| Modifier and Type | Method and Description |
|---|---|
S |
createApplication() |
S |
createApplication(T applicationModule,
com.google.inject.Module... applicationSpecificModules) |
com.google.inject.Injector |
createChildInjector(com.google.inject.Module... withModules) |
com.google.inject.Injector |
getInjector() |
protected com.google.inject.Module[] |
getModules() |
protected void |
setRootInjector(com.google.inject.Injector rootInjector) |
void |
updateModules(com.google.inject.Module... upateModules) |
public InjectorFactory(com.google.inject.Module... modules)
modules - a list of modules to be used for the injector creation
Basic constructor for the Injectorfactorypublic void updateModules(com.google.inject.Module... upateModules)
upateModules - the updateModules which replace the previously defined modules of the InjectorFactoryprotected com.google.inject.Module[] getModules()
public S createApplication(T applicationModule, com.google.inject.Module... applicationSpecificModules)
applicationModule - the mandatory application properties binded via this moduleapplicationSpecificModules - modules allowing to further configure the application specific injector used for the creation of the applicationpublic S createApplication()
protected void setRootInjector(com.google.inject.Injector rootInjector)
rootInjector - the new rootInjector
Allows to adapt the root injector of the InjectorFactorypublic com.google.inject.Injector getInjector()
public com.google.inject.Injector createChildInjector(com.google.inject.Module... withModules)
withModules - modules used for the creation of the child injectorCopyright © 2019. All rights reserved.