68
使用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";
}
感謝您的回答!我編輯了我的問題,以便說清楚。如果該字段的值將直接顯示在JavaDoc中,那將是完美的... – Simon
{@value #STATIC_FIELD}''怎麼辦? –
@PhilippReichart感謝您的糾正。 – EJP