This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
# Must always be numeric (numbers separated by '.', e.g. 4.11).
# See http://openide.netbeans.org/versioning-policy.html for more.
openide.specification.version=4.18
openide.specification.version=4.19
<issue number="11519"/>
</change>
<change id="ModuleInfo.getClassLoader">
<api name="modules"/>
<summary>Added method <code>ModuleInfo.getClassLoader()</code></summary>
<version major="4" minor="19"/>
<date day="25" month="12" year="2003"/>
<author login="jglick"/>
<compatibility addition="yes">
Note that although the new method is abstract, this is a compatible
change insofar as no one outside of the core module system should be
subclassing <code>ModuleInfo</code>.
</compatibility>
<description>
Added a new method <code>ModuleInfo.getClassLoader()</code> making it
possible to find a Java class loader associated with an enabled module.
</description>
<class package="org.openide.modules" name="ModuleInfo"/>
<issue number="38330"/>
<change>
<api name="util"/>
<summary><code>ErrorManager.isLoggable</code> added</summary>
*/
public abstract boolean owns(Class clazz);
/**
* Get a class loader associated with this module that can load
* classes defined in the module.
* <p>
* You can only call this method on an enabled module, and the
* result may change if the module is disabled and reënabled.
* The class loader may or may not be shared with any other
* module, or be the application's startup class loader, etc.
* @return a module class loader
* @throws IllegalArgumentException if this module is disabled
* @since 4.19
public abstract ClassLoader getClassLoader() throws IllegalArgumentException;
/** Get a set of capabilities which this module provides to others that may
* require it.
* The default implementation returns an empty array.
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.core/1
OpenIDE-Module-Specification-Version: 1.20
OpenIDE-Module-Specification-Version: 1.21
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.18
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.19
OpenIDE-Module-Module-Dependencies: org.openide.loaders > 4.11
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties
OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml
}
/** Get the classloader capable of retrieving
// impl of ModuleInfo method
* things from this module.
public ClassLoader getClassLoader() throws IllegalArgumentException {
* If the module is disabled, this will be null (unless this module is fixed).
if (!enabled) {
* If it is enabled, it must not be null.
throw new IllegalArgumentException("Not enabled: " + codeNameBase); // NOI18N
* It is not guaranteed that change events will be fired
* for changes in this property.
assert classloader != null : "Should have had a non-null loader for " + this;
public ClassLoader getClassLoader() {
return classloader;
// Access from ModuleManager:
/** Turn on the classloader. Passed a list of parent modules to use.
* The parents should already have had their classloaders initialized.