public class ClassLoaderProxy extends URLClassLoader
Constructor and Description |
---|
ClassLoaderProxy(URL[] shared,
ClassLoader parent)
Creates a new instance of ClassLoader
|
Modifier and Type | Method and Description |
---|---|
void |
addDelegate(ClassLoader cl) |
void |
addURL(URL url)
Appends the specified URL to the list of URLs to search
for classes and resources.
|
protected void |
finalize() |
protected Class<?> |
findClass(String name) |
protected Class<?> |
findClass(String name,
boolean followImports) |
URL |
findResource(String name) |
URL |
findResourceDirect(String name)
Works like
findResource(String) but only looks at
this module, without delegating to ancestors. |
Enumeration<URL> |
findResources(String name) |
Collection<ClassLoader> |
getDelegates() |
protected Class<?> |
loadClass(String name,
boolean resolve,
boolean followImports) |
void |
removeDelegate(ClassLoader cl) |
void |
stop()
called by the facade class loader when it is garbage collected.
|
String |
toString() |
close, definePackage, getPermissions, getProtectionDomainInternal, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass, getProtectionDomain
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ClassLoaderProxy(URL[] shared, ClassLoader parent)
protected void finalize() throws Throwable
protected Class<?> loadClass(String name, boolean resolve, boolean followImports) throws ClassNotFoundException
ClassNotFoundException
protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class URLClassLoader
ClassNotFoundException
protected Class<?> findClass(String name, boolean followImports) throws ClassNotFoundException
ClassNotFoundException
public URL findResource(String name)
findResource
in class URLClassLoader
public URL findResourceDirect(String name)
findResource(String)
but only looks at
this module, without delegating to ancestors.public Enumeration<URL> findResources(String name) throws IOException
findResources
in class URLClassLoader
IOException
public void addDelegate(ClassLoader cl)
public void removeDelegate(ClassLoader cl)
public Collection<ClassLoader> getDelegates()
public void stop()
public void addURL(URL url)
addURL
in class URLClassLoader
url
- the url to appendCopyright © 2009–2023 Oracle Corporation. All rights reserved.