@Override public Collection<Module> getModules(String moduleName) { // I could not care less about the modules names return getModules(); }
@Override public ModulesRegistry createModulesRegistry() { return modulesRegistry == null ? modulesRegistry = new SingleModulesRegistry(cl) : modulesRegistry; }
public SingleModulesRegistry(ClassLoader singleCL, List<ManifestProxy.SeparatorMappings> mappings) { super(null); this.singleClassLoader = singleCL; setParentClassLoader(singleClassLoader); ModuleDefinition moduleDef = null; try { moduleDef = new ProxyModuleDefinition(singleClassLoader, mappings); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } proxyMod[0] = new ProxyModule(this, moduleDef, singleClassLoader); add(moduleDef); }
@Override public ServiceLocator createServiceLocator(String name) throws MultiException { ServiceLocator serviceLocator = super.createServiceLocator(name); StartupContext sc = startupContext; if (startupContext==null) { sc = new StartupContext(new Properties()); } DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.bind(BuilderHelper.createConstantDescriptor(sc)); config.commit(); return serviceLocator; }
public SingleModulesRegistry(ClassLoader singleCL, List<ManifestProxy.SeparatorMappings> mappings) { super(null); this.singleClassLoader = singleCL; setParentClassLoader(singleClassLoader); ModuleDefinition moduleDef = null; try { moduleDef = new ProxyModuleDefinition(singleClassLoader, mappings); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } proxyMod[0] = new ProxyModule(this, moduleDef, singleClassLoader); add(moduleDef); }
@Override public ServiceLocator createServiceLocator(String name) throws MultiException { ServiceLocator serviceLocator = super.createServiceLocator(name); StartupContext sc = startupContext; if (startupContext==null) { sc = new StartupContext(new Properties()); } DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.bind(BuilderHelper.createConstantDescriptor(sc)); config.commit(); return serviceLocator; }
@Override public Collection<Module> getModules(String moduleName) { // I could not care less about the modules names return getModules(); }
public SingleHK2Factory(ClassLoader cl) { this.cl = cl; this.modulesRegistry = new SingleModulesRegistry(cl); }
public SingleHK2Factory(ClassLoader cl) { this.cl = cl; this.modulesRegistry = new SingleModulesRegistry(cl); }
@Override public ModulesRegistry createModulesRegistry() { return modulesRegistry == null ? modulesRegistry = new SingleModulesRegistry(cl) : modulesRegistry; }