I just found out I can write “{@value}” in the comment of a public static final field to insert the actual field value into the comment. Example:
/** The value of this field is {@value}. */
public static final int someField = 3
In Eclipse, this comment is displayed as “The value of this field is 3”.
Another trick is to write “{@code some-code}” in order to insert code into a comment.
Is there a complete list of these special comment tags somewhere? I couldn’t find one…
This should get you started:
Note the
-tagoption though. Tags are extensible, so there’s no such thing as a complete list.