* that load classes from all the ProgramClassLoader and the URLClassLoader as described above.
*/
public ClassLoader makeClassLoader(final ClassLoader parent)
throws MalformedURLException {
final LocationFactory lf = new LocalLocationFactory();
final List<ClassLoader> classLoaders = Lists.newArrayList();
final List<URL> urls = Lists.newArrayList();
for (final String classPath : localClasspaths) {
final URI uri = new File(classPath).toURI();
if (classPath.endsWith(".jar")) {
classLoaders.add(AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
@Override
public ClassLoader run() {
try {
File expandDir = Files.createTempDir();
jarExpandDirs.add(expandDir);
return ClassLoaders.newProgramClassLoader(
BundleJarUtil.unpackProgramJar(lf.create(uri), expandDir),
ApiResourceListHolder.getResourceList(), parent);
} catch (IOException e) {
throw Throwables.propagate(e);
}
}