Skip to main content


1 reply [Last post]
Joined: 2003-08-29

By a module I mean a well bounded segment of code that has an interface across which implementation details do not leak.

It is almost possible to create modules in Java, some of the JAIN JSRs come close, having a factory class creating object that implement interfaces that make up the rest of the module interface.

There is however no way in Java to mark the factory and interfaces as belonging to the module. Nor is there a standard way of versioning a module (except as part of a Jar). Nor is there a standard way of creating a Service Provider Interface (spi).

All these things are almost there as conventions, but there is no specific language support, or even much library support of modules

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-13

I'm trying to follow your reasoning here, it seems like you are on to something, but I don't yet know what it is.

It is my understanding that since we only talk to interfaces in such 'modules' that Java already supports this.
I have written a package that has a interface and a couple of implementations of that interface, but these are package-protected and thus not visible in the API docs.
For this kind of setup; what would your idea do?

I think my question boils down to; why do you need language support for something that is already possible and enforced (using Interfaces)