@Test public void testBeans() throws IOException { final ModuleBasedContextFactory factory = new ModuleBasedContextFactory(); final ModuleDefinitionSet set = factory.loadModules(defs, "base"); testBeansInContext(set, "base", 1, new String[]{"base"}, new String[]{"child1", "child2", "child1-1"}); testBeansInContext(set, "child1", 2, new String[]{"base", "child1"}, new String[]{"child2", "child1-1"}); testBeansInContext(set, "child2", 4, new String[]{"base", "child2"}, new String[]{"child1", "child1-1"}); testBeansInContext(set, "child1-1", 3, new String[]{"base", "child1", "child1-1"}, new String[]{"child2"}); }
public ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root) throws IOException { final Map<String, ModuleDefinition> modules = wireUpModules(root, defs); final DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root); moduleSet.load(); return moduleSet; }
ModuleBasedContextFactory { public ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root) throws IOException { final Map<String, ModuleDefinition> modules = wireUpModules(root, defs); final DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root); moduleSet.load(); return moduleSet; } }
ModuleBasedContextFactory { public ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root) throws IOException { final Map<String, ModuleDefinition> modules = wireUpModules(root, defs); final DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root); moduleSet.load(); return moduleSet; }  }
ModuleBasedContextFactory { public ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root) throws IOException { final Map<String, ModuleDefinition> modules = wireUpModules(root, defs); final DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root); moduleSet.load(); return moduleSet; }  ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root); }
ModuleBasedContextFactory { public ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root) throws IOException { final Map<String, ModuleDefinition> modules = wireUpModules(root, defs); final DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root); moduleSet.load(); return moduleSet; }  ModuleDefinitionSet loadModules(final Collection<ModuleDefinition> defs, final String root);  }