How can I reference the value of a final static field in the class?

北城以北 提交于 2019-12-03 04:00:23

问题


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";

}

回答1:


Do you mean {@value #STATIC_FIELD}?



来源:https://stackoverflow.com/questions/7868991/how-can-i-reference-the-value-of-a-final-static-field-in-the-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!