Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add external pages to Java code documentation?

Tags:

java

javadoc

When programming in C++, I use Doxygen and frequently create external .dox files for additional documentation that won't fit well in a specific class or method - for instance, file format documentation (for files that are accessed by multiple classes). I tried to find a way to do the same in Java, but it appears that javadoc doesn't have an equivalent feature, all documentation must be written inside the comments of a .java file and is tied to it (or at least to its package). Am I right? Is there an alternative way to do this?

like image 402
Fabio Ceconello Avatar asked Mar 09 '09 02:03

Fabio Ceconello


People also ask

How do you insert a document into Java?

Add a Javadoc using context actionsPlace the caret at the declaration in the editor, press Alt+Enter , and select Add Javadoc from the list.

How do I add a link to a document in Java?

Creating a Link to Javadoc of Another Class To summarize, @link is preferred when we use a class or method name in the description. On the other hand, @see is used when a relevant reference is not mentioned in the description or as a replacement for multiple links to the same reference.

How do you reference another method in Javadoc?

Javadoc provides the @link inline tag for referencing the members in the Java classes. We can think of the @link tag as similar to the anchor tag in HTML, which is used to link one page to another via hyperlinks. Similar to the anchor tag, the path_to_member is the destination, and the label is the display text.

How do I add a Javadoc to a project?

Choose Tools > Java Platform Manager from the main window. Select the platform to which you want to add Javadoc in the left panel of the dialog box. In the Javadoc tab, click Add ZIP/Folder and specify the location of the Javadoc files. Click Close.


2 Answers

The section “Miscellaneous Unprocessed Files” from the javadoc documentation is what you’re looking for.

like image 137
Bombe Avatar answered Sep 27 '22 22:09

Bombe


If you're asking if Javadoc can create external documentation, then the answer is no. But you can link to external documentation you've already made. Additionally, if something applies to the package level, you can put the documentation in the package file instead of attaching it to a particular class or method.

like image 22
John Feminella Avatar answered Sep 27 '22 21:09

John Feminella