ClassLoader that loads classes for a module.
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | initialized
HK2Module will be initialized when this classloader is consulted for the first time. |
| private String | |
| private StackTraceElement[] | |
| private final ReentrantLock | |
| private static final String | |
| private final ModuleImpl |
| Access | Constructor and Description |
|---|---|
| public | ModuleClassLoader(ModuleImpl owner, URL[] shared, ClassLoader parent)
Creates a new instance of ClassLoader |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| protected Class | findClass(String name)
Overrides com. Finds and loads the class with the specified name from the URL search path. |
| public ModuleImpl | |
| public URL | getResource(String name)
Overrides java. Finds the resource with the given name. |
| public Enumeration | getResources(String name)
Overrides java. Finds all the resources with the given name. |
| private void | |
| protected Class | loadClass(String name, boolean resolve)
Overrides java. Loads the class with the specified binary name. |
| public void | stop()
Overrides com. called by the facade class loader when it is garbage collected. |
| public String | toString()
Overrides com. Returns a string representation of the object. |
| initialized | back to summary |
|---|---|
| private volatile boolean initialized HK2Module will be initialized when this classloader is consulted for the first time. | |
| initializerClassName | back to summary |
|---|---|
| private String initializerClassName | |
| initializerThread | back to summary |
|---|---|
| private StackTraceElement[] initializerThread | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| META_INF_SERVICES | back to summary |
|---|---|
| private static final String META_INF_SERVICES | |
| module | back to summary |
|---|---|
| private final ModuleImpl module | |
| ModuleClassLoader | back to summary |
|---|---|
| public ModuleClassLoader(ModuleImpl owner, URL[] shared, ClassLoader parent) Creates a new instance of ClassLoader | |
| dumpState | back to summary |
|---|---|
| pack-priv void dumpState(PrintStream writer) | |
| findClass | back to summary |
|---|---|
| protected Class Overrides com. Doc from java. Finds and loads the class with the specified name from the URL search path. Any URLs referring to JAR files are loaded and opened as needed until the class is found.
| |
| getOwner | back to summary |
|---|---|
| public ModuleImpl getOwner() | |
| getResource | back to summary |
|---|---|
| public URL getResource(String name) Overrides java. Doc from java. Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a ' Resources in named modules are subject to the encapsulation rules
specified by | |
| getResources | back to summary |
|---|---|
| public Enumeration Overrides java. Doc from java. Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a Resources in named modules are subject to the encapsulation rules
specified by
| |
| initialize | back to summary |
|---|---|
| private void initialize(String name) Lazily initialize this module if not done so yet. | |
| loadClass | back to summary |
|---|---|
| protected Class Overrides java. Doc from java. Loads the class with the specified binary name. The default implementation of this method searches for classes in the following order:
If the class was found using the above steps, and the
Subclasses of Unless overridden, this method synchronizes on the result of
| |
| stop | back to summary |
|---|---|
| public void stop() Overrides com. 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 | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |