Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadocs link to external javadoc

I am generating Javadocs. Now I would like to automatically link all library- and JDK classes to the official docs of that lib or JDK. Is that possible, and if so, which command line args do i need

like image 688
Kilobyte Avatar asked Jul 10 '13 20:07

Kilobyte


People also ask

How do I reference a 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 create an automatic Javadoc?

In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file). Note: Only Oracle JDK Version 1.4.

Can you use HTML tags in Javadoc comments?

A Javadoc comment is written in HTML and can therefore use common HTML tags. A JavaDoc comment is made up of two parts, the description followed by block tags. Keep in mind that Javadoc is often read in it's source form, so it should be easy to read and understand without the generated web frontend.


1 Answers

Resolving references to the standard Java classes requires you have a local copy of the Java Docs.

The JDK 7 JavaDocs are available here under Additional Resources

Then, run javadoc, with the -link option. It takes the URL of the documents you want to reference (ex, https://docs.oracle.com/javase/7/docs/api/).

like image 86
Devon_C_Miller Avatar answered Sep 21 '22 14:09

Devon_C_Miller