harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <dmitr...@earthlink.net>
Subject Re: Class Library Modularity [Was Re: State of the World]
Date Wed, 11 May 2005 16:44:02 GMT

> Well, I can think of one thing I would like, some way for the packages 
> contained in a JAR file be able to inform the underlying runtime not 
> only its external dependencies, but also what it provides (or what it 
> exposes). Due to limitations in the Java visibility/protection rules, 
> sometimes it is not possible to avoid making implementation API public 
> because you are forced to declare classes/methods as public if you 
> need to use them from more than one package.

Woudln't it be great if this was addressed at the language level? 
Something like declaring "friend" packages or something like that. Then 
the public modifier would basically fulfil the need for this kind of 
"provides" or "exposes" declaration?

Well, maybe not. If you package a few packages together into a new 
library, each package might have its public interface, but that doesn't 
mean you want those methods as part of your library interface too. So 
the need for "provides" declaration goes beyond the package visibility 
related limitations it seems.

Doesn't Eclipse do something like this?


View raw message