Package com.sun.enterprise.module.impl
Class ModuleClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
com.sun.enterprise.module.impl.ClassLoaderProxy
com.sun.enterprise.module.impl.ModuleClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
ClassLoader
that loads classes for a module.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Module will be initialized when this classloader is consulted for the first time.private String
private StackTraceElement[]
private static final String
private final ModuleImpl
-
Constructor Summary
ConstructorsConstructorDescriptionModuleClassLoader
(ModuleImpl owner, URL[] shared, ClassLoader parent) Creates a new instance of ClassLoader -
Method Summary
Modifier and TypeMethodDescription(package private) void
dumpState
(PrintStream writer) protected void
finalize()
protected Class
<?> getOwner()
getResource
(String name) getResources
(String name) private void
initialize
(String name) Lazily initialize this module if not done so yet.protected Class
<?> void
stop()
called by the facade class loader when it is garbage collected.toString()
Methods inherited from class com.sun.enterprise.module.impl.ClassLoaderProxy
addDelegate, addURL, findClass, findClassDirect, findResource, findResourceDirect, findResources, getDelegates, loadClass, removeDelegate
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, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
module
-
initialized
private volatile boolean initializedModule will be initialized when this classloader is consulted for the first time. -
initializerThread
-
initializerClassName
-
META_INF_SERVICES
- See Also:
-
-
Constructor Details
-
ModuleClassLoader
Creates a new instance of ClassLoader
-
-
Method Details
-
finalize
- Overrides:
finalize
in classClassLoaderProxy
- Throws:
Throwable
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClass
in classClassLoaderProxy
- Throws:
ClassNotFoundException
-
getResource
- Overrides:
getResource
in classClassLoader
-
getResources
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
initialize
Lazily initialize this module if not done so yet. -
dumpState
-
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.- Overrides:
stop
in classClassLoaderProxy
-
getOwner
-
toString
- Overrides:
toString
in classClassLoaderProxy
-