Module Views

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Wed Dec 7 22:28:52 PST 2011


Hi,

On Thu, Dec 8, 2011 at 9:38 AM, <mark.reinhold at oracle.com> wrote:

> 2011/12/7 14:32 -0800, jesse.glick at oracle.com:
> > On 12/07/2011 04:17 PM, mark.reinhold at oracle.com wrote:
>
> >> It also exports all public types in the `foo` package because the
> >> non-default views of a module inherit the exports clauses of that
> >> module's default view.
> >
> > This also seems needlessly confusing, especially in light of the fact
> > that permits are _not_ inherited. Clearer to have each view list its
> > complete contents.
>
> Implicit export-declaration inheritance is motivated by the observation
> that non-default views, at least in the modular JDK itself, always export
> everything that's in the default view.  Having to repeat all those export
> declarations is tedious and error-prone:
>

may be you can use view inheritance here.

 view jdk.tls.internal extends jdk.tls{
...
}

view jdk.tls.common_exports{
...
}

view jdk.tls.common_imports{
...
}

view jdk.tls.nondefault extends common_exports{
...
}

Ali



More information about the jigsaw-dev mailing list