How do I write links into javadocs?
Currently, I have something like:
{@link java.lang.Math#sqrt(double) Math.sqrt}
to produce the text Math.sqrt
that should link to the java.lang.Math.sqrt(double)
API, however, all it does is produce the text, no link.
Best Answer
My answer is very much provided by Eddie, but his exact code doesn't work for me (or at least when using the version of javadoc that comes with Java 1.6)
If I do:
then javadoc complains:
If, on the other hand, I do:
Then it works, and my links are populated as I want them to be.
Additionally, my link isn't malformed. The text
{@link java.lang.Math#sqrt(double) Math.sqrt}
produces the link textMath.sqrt
instead of the defaultMath.sqrt(double)
.