一尘不染

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

java

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

我希望???在此示例中将其替换为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";

}

阅读 226

收藏
2020-12-03

共1个答案

一尘不染

你的意思是{@value #STATIC_FIELD}

2020-12-03