* @return Temporary ClassLoader with same visibility as current loader
*/
public ClassLoader getNewTempClassLoader() {
if (this.classLoader instanceof EZBClassLoader) {
EZBClassLoader currentCL = (EZBClassLoader) this.classLoader;
return currentCL.duplicate();
}
// else, try to see if it's an URL classLoader
if (this.classLoader instanceof URLClassLoader) {
return new URLClassLoader(((URLClassLoader) this.classLoader).getURLs(), this.classLoader.getParent());
}