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 TypeMethodDescriptionvoidvoidAppends the specified URL to the list of URLs to search for classes and resources.protected voidfinalize()protected Class<?> protected Class<?> (package private) ClassfindClassDirect(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<?> voidvoidstop()called by the facade class loader when it is garbage collected.toString()Methods inherited from class URLClassLoader
close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class SecureClassLoader
defineClass, defineClassMethods inherited from class 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:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
findClass
- Throws:
ClassNotFoundException
-
findClassDirect
findClass(String)except the classloader punch-in hack.- Throws:
ClassNotFoundException
-
findResource
- Overrides:
findResourcein classURLClassLoader
-
findResourceDirect
Works likefindResource(String)but only looks at this module, without delegating to ancestors. -
findResources
- Overrides:
findResourcesin 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:
addURLin classURLClassLoader- Parameters:
url- the url to append
-