src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleHandler.java
public static ClassLoader createClassLoader(Collection<ModuleInformation> modules) {
        // iterate all modules and collect all libraries of all modules:
        List<URL> allModuleLibraries = new LinkedList<>();
        File moduleDir = OdPlugin.getInstance().getModulesDirectory();
        for (ModuleInformation info : modules) {
            if (info.libraries == null) {
                continue;
            }
            allModuleLibraries.addAll(info.libraries);
            File moduleJar = new File(moduleDir, info.name + ".jar");
            I18n.addTexts(moduleJar);
            URL moduleJarUrl = ModuleInformation.fileToURL(moduleJar);
            allModuleLibraries.add(moduleJarUrl);
        }

        // create a classloader for all modules:
        return new URLClassLoader(allModuleLibraries.toArray(new URL[0]), OdPlugin.class.getClassLoader());
    }
/**
     * Creates a class loader for loading module code.
     *
     * @param modules the collection of modules which are going to be loaded with this class loader
     * @return the class loader
     */
Creates a class loader for loading module code.

@param modules the collection of modules which are going to be loaded with this class loader
@return the class loader
Creates a class loader for loading module code . @param modules the collection of modules which are going to be loaded with this class loader @return the class loader
public static ClassLoader createClassLoader(Collection<ModuleInformation> modules) {
        List<URL> allModuleLibraries = new LinkedList<>();
        File moduleDir = OdPlugin.getInstance().getModulesDirectory();
        for (ModuleInformation info : modules) {
            if (info.libraries == null) {
                continue;
            }
            allModuleLibraries.addAll(info.libraries);
            File moduleJar = new File(moduleDir, info.name + ".jar");
            I18n.addTexts(moduleJar);
            URL moduleJarUrl = ModuleInformation.fileToURL(moduleJar);
            allModuleLibraries.add(moduleJarUrl);
        }
        return new URLClassLoader(allModuleLibraries.toArray(new URL[0]), OdPlugin.class.getClassLoader());
    }
public static ClassLoader createClassLoader ( Collection < ModuleInformation > modules ) { List < URL > allModuleLibraries = new LinkedList < > ( ) ; File moduleDir = OdPlugin . getInstance ( ) . getModulesDirectory ( ) ; for ( ModuleInformation info : modules ) { if ( info . libraries == null ) { continue ; } allModuleLibraries . addAll ( info . libraries ) ; File moduleJar = new File ( moduleDir , info . name + ".jar" ) ; I18n . addTexts ( moduleJar ) ; URL moduleJarUrl = ModuleInformation . fileToURL ( moduleJar ) ; allModuleLibraries . add ( moduleJarUrl ) ; } return new URLClassLoader ( allModuleLibraries . toArray ( new URL [ 0 ] ) , OdPlugin . class . getClassLoader ( ) ) ; }
Creates a class loader for loading module code.
Creates a class loader for loading module code .
// iterate all modules and collect all libraries of all modules:
 // create a classloader for all modules:
