Eclipse annotation specification template summary
1, a specific operation
(1) In the eclipse, open Window-> Preference-> Java-> Code Style-> Code Templates
(2) then expand Comments annotation node is to be set for all the elements, with reference to specifications provided corresponding to the comment 2
(3) Note that a check mark to automatically add comments. Automatically add comments for new methods and types.
2 comments norms
(1) Files (Files) comment tags
/**
* FileName: ${file_name}
* @Description: ${todo}(用一句话描述该文件做什么)
* All rights Reserved, Designed By HUAWEI
* Copyright: Copyright(C) 2010-2011
* Company ZTE-ITS WuXi LTD.
* @author: ${user}
* @version V1.0
* Createdate: ${date} ${time}
*
* Modification History:
* Date Author Version Discription
*
* ${date} wu.zh 1.0 1.0
* Why & What is modified: <修改原因描述>
*/
(2) types (Types) comment tag (comment class):
/**
* @ClassName: ${type_name}
* @Description:${todo}(这里用一句话描述这个类的作用)
* @author: ${user}
* @date: ${date} ${time}
*
* ${tags}
*/
(3) field (Fields) comment tags:
/**
* @Fields ${field} : ${todo}(用一句话描述这个变量表示什么)
*/
(4) Label Constructor:
/**
* @Title: ${enclosing_type}
* @Description: $ {todo} (sentence herein described effect of this method)
* @param: ${tags}
* @throws
*/
(5) Method (Methods) Tags:
/**
* @Title: ${enclosing_method}
* @Description: ${todo}(这里用一句话描述这个方法的作用)
* @param: ${tags}
* @return: ${return_type}
* @throws
*/
(6) The method of covering (Overriding Methods) Tags:
/**
* <p>Title: ${enclosing_method}</p>
* <p>Description: </p>
* ${tags}
* ${see_to_overridden}
*/
(7) represents the method (Delegate Methods) Tags:
/**
* ${tags}
* ${see_to_target}
*/
(8) getter method Tags:
/**
* @Title: ${enclosing_method} <BR>
* @Description: please write your description <BR>
* @return: ${field_type} <BR>
*/
(9) setter method Tags:
/**
* @Title: ${enclosing_method} <BR>
* @Description: please write your description <BR>
* @return: ${field_type} <BR>
*/