java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
com.sun.enterprise.module.impl.ClassLoaderProxy
- All Implemented Interfaces:
Closeable,AutoCloseable
ClassLoaderProxy capable of loading classes from itself but also from other class loaders
- Author:
- Jerome Dochez
-
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 Class<?>protected Class<?>findResource(String name) findResourceDirect(String name) Works likefindResource(String)but only looks at this module, without delegating to ancestors.findResources(String name) protected Class<?>final voidcalled by the facade class loader when it is garbage collected.voidvoidstop()toString()Methods inherited from class java.net.URLClassLoader
close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
ClassLoaderProxy
Creates a new instance of ClassLoader
-
-
Method Details
-
loadClass
protected Class<?> loadClass(String name, boolean resolve, boolean followImports) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
findClass
- 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
-
registerStopEvent
public final void registerStopEvent()called by the facade class loader when it is garbage collected. this is a good time to see if this module should be unloaded. -
stop
public void stop() -
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
-