Reputation: 12742
Is there correct JavaDoc syntax for {@link Foo.class}
? Neither this, nor {@link Foo#class}
works. Or is this not possible?
Let me expand a bit:
I have a function registerException(Class<? extends Exception> exceptionClass)
that get's called with things like registerException(IOException.class)
and started writing the following JavaDoc for it:
/**
* Registers a new {@link Class Class<? extends Exception>}
* (e.g. <code>IOException.class</code>} that can be flattened by this handler.
*
* @param exceptionClass - the exception class
*/
and I was thinking whether I could place a {@link ...}
around IOException.class
.
Upvotes: 6
Views: 11364
Reputation: 41137
The .class is not needed (and apparently doesn't work).
As noted in a comment, {@link IOException IOException.class} should create a link with an appropriate text label.
Upvotes: 7