Reputation: 5101
In the JavaDoc for a package I'm documenting (specifically, within a package-info.java file), I have a number of lines that look like {@link some.really.long.module.ClassName}
, and naturally I'd like to just import ClassName and say {@link ClassName}
instead, but nothing I've tried works. Is this even possible?
I've tried putting the imports above the package declaration and JavaDoc, but that shows a syntax error. I've tried putting the imports below the package declaration and JavaDoc, but then the JavaDoc process warns Tag @link: reference not found: ClassName
.
Upvotes: 7
Views: 1571
Reputation: 3842
You can do:
This class {@linkplain some.really.long.module.ClassName ClassName} does bla bla bla...
This will show as
This class ClassName does bla bla bla...
Upvotes: 1
Reputation: 2678
Just use the fully qualified name in package-info documentation. JavaDoc will generate HTML without showing the fully qualified name (at least in 1.7), so the results should look fine. It's just more annoying to type.
Upvotes: 0