如何在类中引用最终静态字段的值?

时间:2011-10-23 20:33:50

标签: java documentation javadoc

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

}

1 个答案:

答案 0 :(得分:150)

您的意思是{@value #STATIC_FIELD}吗?