}
// Construct the class loader itself
final URL array[] = set.toArray(new URL[set.size()]);
final ClassLoader parentCL = parent;
StandardClassLoader classLoader = null;
if (parentCL == null) {
classLoader = AccessController.doPrivileged(new PrivilegedAction<StandardClassLoader>() {
@Override
public StandardClassLoader run() {
return new StandardClassLoader(array);
}
});
} else {
classLoader = AccessController.doPrivileged(new PrivilegedAction<StandardClassLoader>() {
@Override
public StandardClassLoader run() {
return new StandardClassLoader(array, parentCL);
}
});
}
classLoader.setDelegate(true);
return (classLoader);
}