示例#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);
       }
     }
   };
 }
示例#2
0
 /** Returns a new module that installs all of {@code modules}. */
 public static Module combine(Module... modules) {
   return combine(ImmutableSet.of(modules));
 }
示例#3
0
 private RealOverriddenModuleBuilder(Iterable<? extends Module> baseModules) {
   this.baseModules = ImmutableSet.copyOf(baseModules);
 }