如何引用类中最终静态字段的值?
使用 JavaDoc,如何引用类中最终静态字段的值?
我希望本示例中的 ???
替换为字段 STATIC_FIELD
的值。
/**
* This is a simple class with only one static field with the value ???.
*/
public class Simple {
/**
* We can reference the value with {@value} here,
* but how do we reference it in the class JavaDoc?
*/
public static final String STATIC_FIELD = "simple static field";
}
Using JavaDoc, how can I reference the value of a final static field in the class?
I want the ???
in this example replaced by the value of the field STATIC_FIELD
.
/**
* This is a simple class with only one static field with the value ???.
*/
public class Simple {
/**
* We can reference the value with {@value} here,
* but how do we reference it in the class JavaDoc?
*/
public static final String STATIC_FIELD = "simple static field";
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是
{@value #STATIC_FIELD}
吗?Do you mean
{@value #STATIC_FIELD}
?