Netflix/governator — pull request #98 by elandau (2014-02-12 11:06:42+00:00)
Title: Support for auto adding a set of modules from a root module using Module DI

Support for module dependency scanning by specifying a root module through which all module dependencies are derived by having an @Inject constructor and dependent modules as constructor arguments.

In the following example modules ModuleC, ModuleB and ModuleA will be added to the injector.

```java
@Singleton
public class ModuleA extends AbstractModule {
@Inject
public ModuleA(ModuleB moduleB, ModuleC moduleC) {
}
public configure() {
...
}
}

@Singleton
public class ModuleB extends AbstractModule {
@Inject
public ModuleB(ModuleC moduleC) {
}
public configure() {
...
}
}

@Singleton
public class ModuleC extends AbstractModule {
@Inject
public ModuleC() {
}
public configure() {
...
}
}

void main() {
Injector injector = LifecycleInjector.builder()
.withRootModule(ModuleA.class)
.build()
.createInjector();
}
```