我刚刚发现我可以在公共静态最终字段的注释中写"{@value}",以将实际字段值插入注释中.例:
/** The value of this field is {@value}. */
public static final int someField = 3
Run Code Online (Sandbox Code Playgroud)
在Eclipse中,此注释显示为"此字段的值为3".另一个技巧是编写"{@code some-code}"以便将代码插入注释中.
某处有这些特殊评论标签的完整列表吗?我找不到一个......