Exemplo n.º 1
0
 /** Returns a new module that installs all of {@code modules}. */
 public static Module combine(Iterable<? extends Module> modules) {
   final Set<Module> modulesSet = ImmutableSet.copyOf(modules);
   return new Module() {
     public void configure(Binder binder) {
       binder = binder.skipSources(getClass());
       for (Module module : modulesSet) {
         binder.install(module);
       }
     }
   };
 }
Exemplo n.º 2
0
 /** Returns a new module that installs all of {@code modules}. */
 public static Module combine(Module... modules) {
   return combine(ImmutableSet.of(modules));
 }
Exemplo n.º 3
0
 private RealOverriddenModuleBuilder(Iterable<? extends Module> baseModules) {
   this.baseModules = ImmutableSet.copyOf(baseModules);
 }