/** This is a utility method a listing of the URL for all UnifiedClassLoaders * associated with the repository. It is never called in response to * class or resource loading. */ public URL[] getURLs() { HashSet<URL> classpath = new HashSet<URL>(); Set<ClassLoader> tmp = classLoaders; for (Iterator<ClassLoader> iter = tmp.iterator(); iter.hasNext();) { ClassLoader obj = iter.next(); if (obj instanceof RepositoryClassLoader) { RepositoryClassLoader cl = (RepositoryClassLoader) obj; URL[] urls = cl.getClasspath(); int length = urls != null ? urls.length : 0; for (int u = 0; u < length; u++) { URL path = urls[u]; classpath.add(path); } } } // for all ClassLoaders URL[] cp = new URL[classpath.size()]; classpath.toArray(cp); return cp; }
/** This is a utility method a listing of the URL for all UnifiedClassLoaders * associated with the repository. It is never called in response to * class or resource loading. */ public URL[] getURLs() { HashSet classpath = new HashSet(); Set tmp = classLoaders; for (Iterator iter = tmp.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof RepositoryClassLoader) { RepositoryClassLoader cl = (RepositoryClassLoader) obj; URL[] urls = cl.getClasspath(); int length = urls != null ? urls.length : 0; for (int u = 0; u < length; u++) { URL path = urls[u]; classpath.add(path); } } } // for all ClassLoaders URL[] cp = new URL[classpath.size()]; classpath.toArray(cp); return cp; }
if (getTranslator() != null) getTranslator().unregisterClassLoader(ucl); URL[] urls = ucl.getClasspath(); for (int u = 0; u < urls.length; u++) classLoaderURLs.remove(urls[u]);
if (getTranslator() != null) getTranslator().unregisterClassLoader(ucl); URL[] urls = ucl.getClasspath(); for (int u = 0; u < urls.length; u++) classLoaderURLs.remove(urls[u]);