generating module-aware javadoc for internal packages

Rick Hillegas rick.hillegas at gmail.com
Tue Jun 19 01:25:30 UTC 2018


Thanks, Jon. That was very helpful. The following command generates 
documentation for the internal, unexported package:

javadoc -d ./build/javadoc \

   -Xdoclint:none \

   --module-source-path ./java \

   --show-module-contents all \

   --show-packages all \

   --module org.test.mymodule



On 6/18/18 5:00 PM, Jonathan Gibbons wrote:
> Rick,
>
> You should look at the new --show-* options which provide a 
> generalization of the previously available options -public, 
> -protected, -package and -private.
>
> From the command-line help:
>
>     --show-members <value>
>                   Specifies which members (fields, methods, etc.) will be
>                   documented, where value can be one of "public", 
> "protected",
>                   "package" or "private". The default is "protected", 
> which will
>                   show public and protected members, "public" will 
> show only
>                   public members, "package" will show public, 
> protected and
>                   package members and "private" will show all members.
>     --show-module-contents <value>
>                   Specifies the documentation granularity of module
>                   declarations. Possible values are "api" or "all".
>     --show-packages <value>
>                   Specifies which modules packages will be documented. 
> Possible
>                   values are "exported" or "all" packages.
>     --show-types <value>
>                   Specifies which types (classes, interfaces, etc.) 
> will be
>                   documented, where value can be one of "public", 
> "protected",
>                   "package" or "private". The default is "protected", 
> which will
>                   show public and protected types, "public" will show only
>                   public types, "package" will show public, protected and
>                   package types and "private" will show all types.
>
> The older options map onto specific combinations of the above new options.
>
>     -package
>                   Show package/protected/public types and members. For
>                   named modules, show all packages and all module details.
>     -private
>                   Show all types and members. For named modules,
>                   show all packages and all module details.
>     -protected
>                   Show protected/public types and members (default). For
>                   named modules, show exported packages and the 
> module's API.
>     -public
>                   Show only public types and members. For named modules,
>                   show exported packages and the module's API.
>
>
> You may also want to note that package names can be specified in the form
>
> module/package
>
> if you wish to disambiguate the module containing a specific package.
>
> -- Jon
>
>
> On 06/17/2018 03:45 PM, Rick Hillegas wrote:
>> I would appreciate your advice about how to generate module-aware 
>> documentation for internal packages which have not been exported by 
>> the corresponding module info.
>>
>> Given the attached project, the following command works fine...
>>
>> javadoc -d ./build/javadoc \
>>   -Xdoclint:none \
>>   --module-source-path ./java \
>>   --module org.test.mymodule \
>>   visiblepackage
>>
>> However, the following command...
>>
>> javadoc -d ./build/javadoc \
>>   -Xdoclint:none \
>>   --module-source-path ./java \
>>   --module org.test.mymodule \
>>   visiblepackage invisiblepackage
>>
>> ...dies with the following diagnostic messages:
>>
>> Loading source files for package visiblepackage...
>> Loading source files for package invisiblepackage...
>> javadoc: error - No source files for package invisiblepackage
>> 1 error
>>
>> Thanks,
>> -Rick
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20180618/2ca98ac1/attachment.html>


More information about the javadoc-dev mailing list