close
javadoc是介紹最上方java文件的寫法
介紹如下
General form 一般格式
用/**開頭 */結尾, 每行文字前面要有*
/**
* Multiple lines of Javadoc text are written here,
* wrapped normally...
*/
/** An especially short bit of Javadoc. */
Paragraphs 段落
每行開頭有*並且加空白之後才打字, 如果有@要放在開頭,
有<p>和第一個字中間不用空白
At-clauses @子句
按照@param, @return, @throws, @deprecated的順序
The summary fragment 摘要片段
用簡單敘述來介紹class或method
Where Javadoc is used 哪裡要用Javadoc
在所有的class, method, field都要使用
最小限度在public或protected的member上
Exception: self-explanatory methods 例外:不需寫的方法
如果直接看就能懂就可以不用寫
Exception: overrides 例外: overrides
在overrides就不需要使用其方法
1. 官網https://google.github.io/styleguide/javaguide.html#s7-javadoc
文章標籤
全站熱搜
留言列表