exports directive

Mandy Chung mandy.chung at oracle.com
Mon Jun 18 20:10:36 PDT 2012


On 6/18/2012 7:20 PM, David Holmes wrote:
> Does export work like a prefix such that
>
> exports foo;
>
> means the module exports all types in package foo, plus all types in 
> all subpackages of foo? Or do I need to use multiple exports 
> directives, or wildcards?
>

|exports| takes a qualified identifier indicating a package name.  You 
need to use multiple |exports| directives to list its subpackages:

|module foo {
     exports foo;
     exports foo.spi;
     exports foo.util;
}
|


> And is this documented somewhere?
>

http://openjdk.java.net/projects/jigsaw/doc/lang-vm.html
http://cr.openjdk.java.net/~mr/jigsaw/notes/jigsaw-big-picture-01

Mandy




More information about the jigsaw-dev mailing list