How to add reference to a method parameter in javadoc?

Viewed 153875

Is there a way to add references to one or more of a method's parameters from the method documentation body? Something like:

/**
 * When {@paramref a} is null, we rely on b for the discombobulation.
 *
 * @param a this is one of the parameters
 * @param b another param
 */
void foo(String a, int b)
{...}
5 Answers

Here is how it is written in Eclipse Temurin JDK 8 sources:

enter image description here

It looks like the only way is or {@code }, but it's not a link - it's just formatting.

Related