Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc comments in module-info

The Java 9 modules feature adds (higher-level) module-info files in addition to the package-info files that existed previously. Can module-info.java (source-code) files include marked-up comments that the JavaDoc tool will extract and present (usefully) as module-level documentation?

like image 920
Raedwald Avatar asked Mar 05 '23 20:03

Raedwald


2 Answers

In a word - yes. You can see, for example, how Java 9's Javadoc has module-level documentation (including tags for provides, uses, moduleGraph), which then lists the packages in them with their documentation. The packages, in turn, contain classes with their documentation.

As a quick example, check out the jdk.jshell module documentation.

like image 159
Mureinik Avatar answered Mar 30 '23 05:03

Mureinik


Yes. And the tags supported at module declaration are:

Module Declaration

{@author}, {@deprecated}, {@provides}, {@see}, {@since}, {@serialField}, {@uses}, {@version}
{@code}, {@docRoot}, {@index}, {@link}, {@linkplain}, {@literal}, {@summary}

Source:- Documentation Comment Specification for the Standard doclet

Amongst these, the newly introduced tags you might further be interested in are :

  1. @index
  2. @summary

and then module specific

  1. @provides
  2. @uses
like image 29
Naman Avatar answered Mar 30 '23 06:03

Naman