public class IsolatingClassLoader extends URLClassLoader
| Modifier and Type | Class and Description |
|---|---|
static class |
IsolatingClassLoader.InvalidContextClassLoaderException |
| Constructor and Description |
|---|
IsolatingClassLoader(String name,
URL[] classpath,
ClassLoader parent,
String[] isolated,
boolean augmentClassPath)
Constructor for IsolatingClassLoader.
|
IsolatingClassLoader(String name,
URL[] classpath,
String[] isolated,
boolean augmentClassPath)
Constructor for IsolatingClassLoader.
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
loadClass(String name,
boolean resolve)
Override to only check parent ClassLoader if the class name
doesn't match our list of isolated classes.
|
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic IsolatingClassLoader(String name, URL[] classpath, String[] isolated, boolean augmentClassPath) throws IsolatingClassLoader.InvalidContextClassLoaderException
Constructor for IsolatingClassLoader.
classpath - Where to find classes.isolated - Array of fully qualified class names, or fully
qualified prefixes ending in "*", that identify the packages or
classes to isolate.augmentClassPath - true => Add the URL's of the current
thread context class loader to classpath.name - a String object.IsolatingClassLoader.InvalidContextClassLoaderException - If augmentClassPath
is true and the current thread context class loader is not a
URLClassLoader.public IsolatingClassLoader(String name, URL[] classpath, ClassLoader parent, String[] isolated, boolean augmentClassPath) throws IsolatingClassLoader.InvalidContextClassLoaderException
Constructor for IsolatingClassLoader.
classpath - Where to find classes.isolated - Array of fully qualified class names, or fully
qualified prefixes ending in "*", that identify the packages or
classes to isolate.augmentClassPath - true => Add the URL's of the current
thread context class loader to classpath.name - a String object.parent - a ClassLoader object.IsolatingClassLoader.InvalidContextClassLoaderException - If augmentClassPath
is true and the current thread context class loader is not a
URLClassLoader.protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionCopyright © 2015. All rights reserved.