Package com.sun.enterprise.module.impl
Class ClassLoaderProxy
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
com.sun.enterprise.module.impl.ClassLoaderProxy
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ModuleClassLoader
ClassLoaderProxy capable of loading classes from itself but also from other class loaders
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<ClassLoaderFacade> private final List
<ClassLoader> -
Constructor Summary
ConstructorsConstructorDescriptionClassLoaderProxy
(URL[] shared, ClassLoader parent) Creates a new instance of ClassLoader -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Appends the specified URL to the list of URLs to search for classes and resources.protected void
finalize()
protected Class
<?> protected Class
<?> (package private) Class
findClassDirect
(String name) findClass(String)
except the classloader punch-in hack.findResource
(String name) findResourceDirect
(String name) Works likefindResource(String)
but only looks at this module, without delegating to ancestors.findResources
(String name) protected Class
<?> void
void
stop()
called by the facade class loader when it is garbage collected.toString()
Methods inherited from class java.net.URLClassLoader
close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
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
-
Field Details
-
surrogates
-
facadeSurrogates
-
-
Constructor Details
-
ClassLoaderProxy
Creates a new instance of ClassLoader
-
-
Method Details
-
finalize
-
loadClass
protected Class<?> loadClass(String name, boolean resolve, boolean followImports) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClass
in classURLClassLoader
- Throws:
ClassNotFoundException
-
findClass
- Throws:
ClassNotFoundException
-
findClassDirect
findClass(String)
except the classloader punch-in hack.- Throws:
ClassNotFoundException
-
findResource
- Overrides:
findResource
in classURLClassLoader
-
findResourceDirect
Works likefindResource(String)
but only looks at this module, without delegating to ancestors. -
findResources
- Overrides:
findResources
in classURLClassLoader
- Throws:
IOException
-
addDelegate
-
removeDelegate
-
getDelegates
-
stop
public void stop()called by the facade class loader when it is garbage collected. this is a good time to see if this module should be unloaded. -
toString
-
addURL
Appends the specified URL to the list of URLs to search for classes and resources.- Overrides:
addURL
in classURLClassLoader
- Parameters:
url
- the url to append
-