Javadoc: link to package-info
Asked Answered
P

3

11

I'm using package-info.java files in my javadoc. I'm trying to link from classes contained in a package to the package-info of the very same package. I have tried several options inspired by this Oracle document.

For example, the package is:

com.zombo.apps.api.stream

I'm inside com.orcsoftware.apps.api.stream.someClass and am writing

@see com.zombo.apps.api.stream.package-info

The link doesn't get rendered in the javadoc. How can I link to the package-info?

Prothrombin answered 19/11, 2015 at 12:33 Comment(0)
E
15

If you remove the .package-info it should work nicely:

@see com.zombo.apps.api.stream
Etty answered 20/11, 2015 at 10:31 Comment(1)
thanks. I did that before but it didn't work. Your comment made me try again. I played around with the javadoc compilation settings. I had to set the package flag as well. That made it work. I would have almost given up without your comment! Thanks.Prothrombin
F
5

For those who want to reference a package-info without using the @see tag: {@link com.zombo.apps.api.stream} also works.

Farr answered 22/1, 2021 at 17:7 Comment(0)
S
0

In a module application (when you have a module-info.java file in the source path) the package link should start with a module name reference. For example:

@see module/package.class#member

See chapter "References" in https://docs.oracle.com/en/java/javase/20/docs/specs/javadoc/doc-comment-spec.html

Suiter answered 6/7, 2023 at 7:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.