exports directive
    David Holmes 
    david.holmes at oracle.com
       
    Mon Jun 18 20:17:24 PDT 2012
    
    
  
On 19/06/2012 1:10 PM, Mandy Chung wrote:
> 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
Thanks Mandy!
Annoyingly tedious to have to list all the subpackages directly though. 
Libraries that make extensive use of subpackages for grouping things 
will need to use long exports lists. Some kind of wildcard support would 
be quite useful I think.
David
-----
> Mandy
>
    
    
More information about the jigsaw-dev
mailing list