@[toc]
设置注释模板的入口:Window->Preference->Java->Code Style->Code Template 然后展开Comments节点就是所有需设置注释的元素。本文将每一个元素逐一给大家介绍一下。
1.文件(Files)注释标签
/**
* @Title: ${file_name}
* @Description:
* @author Redamancy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
2.类型(Types)注释标签(类的注释)
/**
* @ClassName: ${type_name}
* @Description:
* @author Redamancy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
3.字段(Fields)注释标签
/**
* @Fields ${field}
* @Description:
* @author Redamancy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
4.构造函数(Constructor)标签
/**
* @Constructor: ${enclosing_type}
* @Description: ${enclosing_type}构造函数
* @author Redamancy
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
5.方法(Methods)标签
/**
* @MethodName: ${enclosing_method}
* @Description: ${todo}
* @author Redamancy
* @return ${return_type}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
6.覆盖方法(Overriding Methods)标签
/**
* @MethodName: ${enclosing_method}
* @Description: ${todo}
* @author Redamancy
* ${tags}
* ${see_to_overridden}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
7.代理方法(Delegate Methods)标签
/**
* ${tags}
* ${see_to_target}
*/
8.getter方法标签
/**
* @return the ${bare_field_name}
*/
9.setter方法标签
/**
* @param ${param} the ${bare_field_name} to set
*/