UniJ icon indicating copy to clipboard operation
UniJ copied to clipboard

No public or protected classes found to document.

Open tlinkowski opened this issue 6 years ago • 4 comments

Occurs for all unij-bundle-* projects and empty unij-collect-* and unij-misc-* projects.

We probably just need to disable javadoc until the project contents are filled.

tlinkowski avatar Aug 19 '19 16:08 tlinkowski

This still occurs for unij-bundle-* projects if we try to enable javadoc, even after #42 has been fixed.

tlinkowski avatar Aug 21 '19 08:08 tlinkowski

Wonder how it works for JDK's java.se module, which also has no public or protected classes to document, and yet it's Javadoc gets generated:

  • source: https://github.com/openjdk/jdk/blob/master/src/java.se/share/classes/module-info.java
  • javadoc: https://docs.oracle.com/en/java/javase/11/docs/api/java.se/module-summary.html

Source:

  • thrown from: https://github.com/openjdk/jdk/blob/6bab0f539fba8fb441697846347597b4a0ade428/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java#L193-L199
  • message: https://github.com/openjdk/jdk/blob/master/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties#L60

The one potential workaround I found: https://stackoverflow.com/questions/1138390/javadoc-for-package-info-java-only (it'd require adding a dummy temporary file to javadoc sources - the original issue is about package-info, so I'm not sure it'd work here).

tlinkowski avatar Aug 22 '19 12:08 tlinkowski

This is a bigger problem - even other modules for which the JavaDoc is generated don't have proper info about modules they require, etc.

The main problem here is this - modules are not specified as targets to be documented at all (there is no module summary in any of the modules).

I tried playing with --module, --module-source-path, and -Xmodule: options, but to no avail so far. It must be possible to do this in such a way that JavaDoc understands there are other modules and documents/links to them.

When it works, @moduleGraph option should probably work too (currently, it has no effect).

tlinkowski avatar Sep 14 '19 04:09 tlinkowski

Some related links:

  • https://stackoverflow.com/questions/53973319/how-to-generate-javadoc-for-multiple-modules
  • https://stackoverflow.com/questions/49476559/java-9-error-not-in-a-module-on-the-module-source-path

tlinkowski avatar Sep 15 '19 03:09 tlinkowski