Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 19621 - Ability to declare public classes of a module
Ability to declare public classes of a module
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Module System
3.x
PC Linux
: P3 (vote)
: 3.x
Assigned To: Jesse Glick
issues@platform
:
Depends on: 19622
Blocks: 17773
  Show dependency treegraph
 
Reported: 2002-01-20 15:19 UTC by Jesse Glick
Modified: 2008-12-23 08:36 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-01-20 15:19:25 UTC
It is desirable for a module providing an API to be able to declare which
packages it exports (incl. from its extensions). For example:

OpenIDE-Module-Public-Packages: org.nb.api.foo.*, org.nb.spi.foo.**

(Here: the package org.nb.api.foo is exported; org.nb.spi.foo and any
subpackages are exported.)

Modules depending on it via specification version may only directly access
classes (and I suppose resources) in these packages, enforced by classloader.

For compatibility, by default all packages would be public. The syntax:

OpenIDE-Module-Public-Packages: -

would mean that *none* are. (The module might still be used as an API in other
ways, e.g. via XML.)

nbres: and nbresloc: URLs and systemClassLoader would still load resources and
classes from module classloaders regardless of this declaration. Only module
classloaders would be restricted.

Only module dependencies with no version indicated, or with a specification
version dependency, would be affected. Module dependencies based on exact
implementation version match would *not* be restricted by the declaration,
meaning that bridge modules could have access to classes not officially part of
an API, so long as they were closely tied to the base module and shared impl
versions.
Comment 1 Jaroslav Tulach 2002-01-28 11:49:42 UTC
I was affraid what you will do with bridge modules, but your decision
(specification/implementation version) seems right, Jesse.
Comment 2 Jesse Glick 2002-01-28 14:25:08 UTC
I hope that will make things work correctly for bridge modules. Note
that this would mean bridges would have to be made so that the impl
versions match that of the main module. Minor build script adjustment,
to ensure that both subst manifests are updated at once, even if you
e.g. change just one source manifest and do an incremental build.
Comment 3 Jesse Glick 2002-02-14 18:01:15 UTC
Issue #19622 contains much of the basic implementation.
Comment 4 Jesse Glick 2002-05-16 18:09:05 UTC
committed   * Up-To-Date  1.2         core/manifest.mf
committed   * Up-To-Date  1.6         core/javahelp/manifest.mf
committed   * Up-To-Date  1.25       
core/src/org/netbeans/core/modules/Module.java
committed   * Up-To-Date  1.34       
core/src/org/netbeans/core/modules/NbInstaller.java
committed   * Up-To-Date  1.18       
core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java
committed   * Up-To-Date  1.4        
core/test/unit/src/org/netbeans/core/modules/SetupHid.java
committed   * Up-To-Date  1.11       
core/test/unit/src/org/netbeans/core/modules/build.xml
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-all.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-api.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-none.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/uses-api-impl-dep.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/uses-api-simple-dep.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/uses-api-spec-dep.mf
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/exposes-api/org/netbeans/api/foo/PublicClass.java
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/exposes-api/org/netbeans/modules/foo/ImplClass.java
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/uses-api/usesapi/UsesImplClass.java
added       * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/jars/uses-api/usesapi/UsesPublicClass.java
committed   * Up-To-Date  1.86        core/www/plans/plan.xml
committed   * Up-To-Date  1.58        openide/openide-spec-vers.properties
committed   * Up-To-Date  1.67       
openide/api/doc/changes/apichanges.xml
committed   * Up-To-Date  1.22       
openide/api/doc/org/openide/doc-files/upgrade.html
committed   * Up-To-Date  1.76       
openide/api/doc/org/openide/modules/doc-files/api.html
committed   * Up-To-Date  1.14        openide/www/versioning-policy.html
Comment 5 Jesse Glick 2002-09-05 23:21:45 UTC
Moved basic impl of this part into central module system, leaving
#19622 impl (classpath packages) in NbInstaller.

committed   * Up-To-Date  1.5        
core/src/org/netbeans/core/modules/ModuleInstaller.java
committed   * Up-To-Date  1.41       
core/src/org/netbeans/core/modules/ModuleManager.java
committed   * Up-To-Date  1.45       
core/src/org/netbeans/core/modules/NbInstaller.java
committed   * Up-To-Date  1.21       
core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java
removed     * Up-To-Date  1.1        
core/test/unit/src/org/netbeans/core/modules/NbInstallerTest1.java


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo