ecplise注释模板
1、在“Window–>Preferences”路径下,打开Preferences窗口。
2、在“Java–>Code Style–>Code Templates”路径下,可以对类、方法等等进行注释模板的编辑。
各个类型的注释模板
1、类型(Types)注释标签(类的注释):
/**
* @ClassName: ${type_name}
* @Description: ${todo}(这里用一句话描述这个类的作用)
* @author ${user}
* @date ${currentDate:date('yyyy-MM-dd HH:mm:ss')}
* ${tags}
*/
2、文件(Files)注释标签:
/**
* @Title: ${file_name}
* @Package ${package_name}
* @Description: ${todo}(用一句话描述该文件做什么)
* @author ${user}
* @date ${currentDate:date('yyyy-MM-dd HH:mm:ss')}
* @version V1.0
*/
3、字段(Fields)注释标签:
/**
* @Fields field:field:{todo}(用一句话描述这个变量表示什么)
*/
4、方法(Methods)标签:
/**
* @Title: ${enclosing_method}
* @Description: ${todo}(这里用一句话描述这个方法的作用)
* @author ${user}
* @date ${currentDate:date('yyyy-MM-dd HH:mm:ss')}
* @param ${tags} 参数
* @return ${return_type} 返回类型
* @throws
*/
5、构造函数(Constructor)标签:
/**
* @Title: ${enclosing_type}
* @Description: ${todo}(这里用一句话描述这个方法的作用)
* @author: ${user}
* @date: ${currentDate:date('yyyy-MM-dd HH:mm:ss')}
* @param: ${tags}
* @throws
*/