Use Java Doc to generate a yourself API document
程序员文章站
2022-06-07 15:57:22
...
Write your Java code in your workspace with annotation by IDEA
package com.qx.redis;
/**
* @version 1.0
* @Author: QX_He
* DATA: 2020/8/9-23:55
* Description:
* @sicne 1.8
**/
public class Doc {
/**
* @author qx_java
* @param name
* @return
* @throws Exception
*/
public String docTest(String name) throws Exception{
return null;
}
}
The annotations are as below five
@Author
@Version
@since
@param
@return
@throws
Perform java command in cmd terminal to packaging the java.class to a document
javadoc -encoding UTF-8 -charset UTF-8 yourJacaClass.java
Then,you can double click in index.html to check your java document whether was generated successfully in your computer path who is in the same path as your .java file .
上一篇: 一个看似简单的有趣有关问题,有多少人会
下一篇: PHP里还有这些好用的技巧