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