To reduce the confusion this is a new RFE
based on much of the conversation in bug 4330419.
When @see or {@link} refers to a class that is neither
referenced in a declaration or import nor included on
the command line, but -link or -linkoffline points to it,
the link is not generated. That is, the text appears
without any link. The link should be generated.
The current behavior requires the developer to add an import
statement to be added to the source code merely for the
link to work. This seems unnecessarily burdensome.
We have created an FAQ answer stating to comment the
import statement
Example:
package p;
//import java.util.List;
/**
* This inline link tag has no link when its import statement is missing
* {@link java.util.List}.
*/
public class Test {
}
% javadoc -d docs -linkoffline http://java.sun.com/j2se/1.3/docs/api . p
The HTML comment looks like this -- notice there are no
<A HREF> links:
This inline link tag has no link when its import statement is missing
java.util.List
By uncommenting the "import java.util.List" statement, the link appears.
Note that starting with 1.4.0, wildcard import "import java.util.*" is
sufficient for the link to appear.