Exported Classes and OSGi Re: Supporting OSGi Bundles in the Java Module System
Stanley M. Ho
Stanley.Ho at sun.com
Wed Jun 11 11:37:56 PDT 2008
Adrian Brock wrote:
> So a 291 module that hasn't been updated to reflect changes from 294
> would just expose package exports and the importing 277 module
> would know how to deal with that?
A 291 module which exports packages is fundamentally exporting public
types, which will continue to work across module boundaries. If a JAM
module imports a 291 module, it'll know how to deal with this if
getExportedClasses() is not supported in the imported ModuleDefinition.
> The 291 module classes would be like legacy classes that
> don't belong to a module in the 294 sense.
> i.e. Class.getModuleInfo() would return null
Types which are not in a named module are in the unnamed module; the
changes in the Java Language Specification (JLS) will say this. null is
probably as good a value as any for representing this.
More information about the jsr277-eg-observer