编辑注释模板的方法:Window->Preference->Java->Code Style->Code Template 然后展开Comments
1.文件(Files)注释标签:
/** * All rights Reserved, Designed By www.ts.com * @Title:${file_name} * @Package${package_name} * @Description:${todo}(用一句话描述该文件做什么) * @author:yh * @date:${date} ${time} * @version V1.0 * @Copyright:${year} www.ts.com Inc. All rights reserved. * 注意:本内容仅限于内部传阅,禁止外泄以及用于其他的商业目 */
2.类型(Types)注释标签(类的注释):
/** * @ClassName:${type_name} * @Description:${todo}(这里用一句话描述这个类的作用) * @author:yh * @date:${date} ${time} * ${tags} * @Copyright:${year} www.ts.com Inc. All rights reserved. * 注意:本内容仅限于公司内部传阅,禁止外泄以及用于其他的商业目 */
3.字段(Fields)注释标签:
/** * @Fields ${field}:${todo} */
4.构造函数标签:
/** * @Title:${enclosing_type} * @Description:${todo} * @param:${tags} * @throws */
5.方法(Methods)标签:
/** * @Title:${enclosing_method} * @Description:${todo} * @param:${tags} * @return:${return_type} * @throws */
6.覆盖方法(Overriding Methods)标签:
/** * <p>Title:${enclosing_method}</p> * <p>Description:</p> * ${tags} * ${see_to_overridden} */
7.代表方法(Delegate Methods)标签:
/** *${tags} * ${see_to_target} */
8.getter方法标签:
/** * @Title:${enclosing_method}<BR> * @Description:please write your description<BR> * @return:${field_type}<BR> */
9.setter方法标签:
/** * @Title:${enclosing_method}<BR> * @Description: please write your description<BR> * @return: ${field_type}<BR> */
余下的默认即可.