public ClassPathBasedModulesRegistry(ClassLoader singleCL, String classPath) throws IOException { super(null); this.cLoader = singleCL; setParentClassLoader(cLoader); StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator); while (st.hasMoreTokens()) { String classPathElement = st.nextToken(); File f = new File(classPathElement); if (f.exists()) { ModuleDefinition md = new DefaultModuleDefinition(f); moduleDefs.add(md); add(md); } } // now create fake modules for (ModuleDefinition md : moduleDefs) { // they all use the same class loader since they are not really modules // and we don't run in a modular environment modules.add(new ProxyModule(this, md, cLoader)); } }
public ClassPathBasedModulesRegistry(ClassLoader singleCL, String classPath) throws IOException { super(null); this.cLoader = singleCL; setParentClassLoader(cLoader); StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator); while (st.hasMoreTokens()) { String classPathElement = st.nextToken(); File f = new File(classPathElement); if (f.exists()) { ModuleDefinition md = new DefaultModuleDefinition(f); moduleDefs.add(md); add(md); } } // now create fake modules for (ModuleDefinition md : moduleDefs) { // they all use the same class loader since they are not really modules // and we don't run in a modular environment modules.add(new ProxyModule(this, md, cLoader)); } }
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); }
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); }