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.

View | Details | Raw Unified | Return to bug 38330
Collapse All | Expand All

(-)openide/openide-spec-vers.properties (-1 / +1 lines)
Lines 4-7 Link Here
4
# Must always be numeric (numbers separated by '.', e.g. 4.11).
4
# Must always be numeric (numbers separated by '.', e.g. 4.11).
5
# See http://openide.netbeans.org/versioning-policy.html for more.
5
# See http://openide.netbeans.org/versioning-policy.html for more.
6
6
7
openide.specification.version=4.18
7
openide.specification.version=4.19
(-)openide/api/doc/changes/apichanges.xml (+19 lines)
Lines 2227-2232 Link Here
2227
      <issue number="11519"/>
2227
      <issue number="11519"/>
2228
    </change>
2228
    </change>
2229
2229
2230
    <change id="ModuleInfo.getClassLoader">
2231
      <api name="modules"/>
2232
      <summary>Added method <code>ModuleInfo.getClassLoader()</code></summary>
2233
      <version major="4" minor="19"/>
2234
      <date day="25" month="12" year="2003"/>
2235
      <author login="jglick"/>
2236
      <compatibility addition="yes">
2237
        Note that although the new method is abstract, this is a compatible
2238
        change insofar as no one outside of the core module system should be
2239
        subclassing <code>ModuleInfo</code>.
2240
      </compatibility>
2241
      <description>
2242
        Added a new method <code>ModuleInfo.getClassLoader()</code> making it
2243
        possible to find a Java class loader associated with an enabled module.
2244
      </description>
2245
      <class package="org.openide.modules" name="ModuleInfo"/>
2246
      <issue number="38330"/>
2247
    </change>
2248
2230
    <change>
2249
    <change>
2231
      <api name="util"/>
2250
      <api name="util"/>
2232
      <summary><code>ErrorManager.isLoggable</code> added</summary>
2251
      <summary><code>ErrorManager.isLoggable</code> added</summary>
(-)openide/src/org/openide/modules/ModuleInfo.java (+15 lines)
Lines 128-133 Link Here
128
     */
128
     */
129
    public abstract boolean owns(Class clazz);
129
    public abstract boolean owns(Class clazz);
130
    
130
    
131
    /**
132
     * Get a class loader associated with this module that can load
133
     * classes defined in the module.
134
     * <p>
135
     * You can only call this method on an enabled module, and the
136
     * result may change if the module is disabled and re&euml;nabled.
137
     * <p>
138
     * The class loader may or may not be shared with any other
139
     * module, or be the application's startup class loader, etc.
140
     * @return a module class loader
141
     * @throws IllegalArgumentException if this module is disabled
142
     * @since 4.19
143
     */
144
    public abstract ClassLoader getClassLoader() throws IllegalArgumentException;
145
131
    /** Get a set of capabilities which this module provides to others that may
146
    /** Get a set of capabilities which this module provides to others that may
132
     * require it.
147
     * require it.
133
     * The default implementation returns an empty array.
148
     * The default implementation returns an empty array.
(-)core/manifest.mf (-2 / +2 lines)
Lines 1-8 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.core/1
2
OpenIDE-Module: org.netbeans.core/1
3
OpenIDE-Module-Specification-Version: 1.20
3
OpenIDE-Module-Specification-Version: 1.21
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.18
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.19
6
OpenIDE-Module-Module-Dependencies: org.openide.loaders > 4.11
6
OpenIDE-Module-Module-Dependencies: org.openide.loaders > 4.11
7
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties
7
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties
8
OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml
8
OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml
(-)core/src/org/netbeans/core/modules/Module.java (-8 / +7 lines)
Lines 852-867 Link Here
852
        }
852
        }
853
    }
853
    }
854
    
854
    
855
    /** Get the classloader capable of retrieving
855
    // impl of ModuleInfo method
856
     * things from this module.
856
    public ClassLoader getClassLoader() throws IllegalArgumentException {
857
     * If the module is disabled, this will be null (unless this module is fixed).
857
        if (!enabled) {
858
     * If it is enabled, it must not be null.
858
            throw new IllegalArgumentException("Not enabled: " + codeNameBase); // NOI18N
859
     * It is not guaranteed that change events will be fired
859
        }
860
     * for changes in this property.
860
        assert classloader != null : "Should have had a non-null loader for " + this;
861
     */
862
    public ClassLoader getClassLoader() {
863
        return classloader;
861
        return classloader;
864
    }
862
    }
863
865
    // Access from ModuleManager:
864
    // Access from ModuleManager:
866
    /** Turn on the classloader. Passed a list of parent modules to use.
865
    /** Turn on the classloader. Passed a list of parent modules to use.
867
     * The parents should already have had their classloaders initialized.
866
     * The parents should already have had their classloaders initialized.

Return to bug 38330