[jsr294-modularity-eg] Nested superpackage visibility

Andreas Sterbenz Andreas.Sterbenz at Sun.COM
Wed Jun 27 03:03:19 EDT 2007


Glyn Normington wrote:
> 
> The strawman says of nested superpackages:
> 
>  > The enclosing superpackage can declare a nested superpackages as 
> exported. If exported, the
>  > exported types of the nested superpackage are accessible outside the 
> enclosing superpackage.
>  > If not exported, the exported types of the nested superpackage are 
> accessible to other types
>  > in the enclosing superpackage but not outside the enclosing 
> superpackage.
> 
> An observer pointed out that the last sentence above can be interpreted 
> as meaning that sibling nested superpackages cannot see each other's 
> exported classes. It depends on how you interpret the phrase "other 
> types in the enclosing superpackage". Is that intended to be types 
> 'directly' contained in the enclosing superpackage or does it also 
> include types in nested superpackages (nested to any level) contained in 
> the enclosing superpackage?

The text is somewhat unclear. Thanks for pointing this out.

The intent is absolutely that sibling nested superpackages can see each 
other's exported types. Alex and I are looking into providing a better 
informal explanation of this issue. At the same time we also want to 
formally write up the proposed access control rules in detail to make sure 
everyone is on the same page.

Andreas.


More information about the jsr294-modularity-eg mailing list