我正在努力遵守 Java Style Guide正如 Error Prone 所建议的.
栏目 7.2 The summary fragment声明如下:
Each Javadoc block begins with a brief summary fragment. This fragment is very important: it is the only part of the text that appears in certain contexts such as class and method indexes.
This is a fragment—a noun phrase or verb phrase, not a complete sentence. It does not begin with A {@code Foo} is a..., or This method returns..., nor does it form a complete imperative sentence like Save the record.. However, the fragment is capitalized and punctuated as if it were a complete sentence.
这是我想知道的:
最佳答案
您的前两个问题已得到解答 here :
The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the API item. This means the first sentence of each member, class, interface or package description.
The Javadoc tool copies this first sentence to the appropriate member, class/interface or package summary. This makes it important to write crisp and informative initial sentences that can stand on their own.
“方法摘要”和“索引”都是 Java 文档的一部分。
关于java - 什么是 Javadoc 摘要片段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66258854/