Eclipse註釋模板

網上的Eclipse註釋模板,在這裏稍稍整理一些比較經常使用的。html

編輯註釋模板的方法:Window->Preference->Java->Code Style->Code Template 而後展開Comments節點就是全部需設置註釋的元素啦。現就每個元素逐一介紹:android

1.文件(Files)註釋標籤:函數

[html] view plain copy print?spa

/**  .net

 * All rights Reserved, Designed By Android_Robot   orm

 * @Title :  ${file_name}   htm

 * @Package ${package_name}   blog

 * @Description:    ${todo}(用一句話描述該文件作什麼)   ip

 * @author : Android_Robot     get

 * @date :   ${date} ${time}   

 * @version V1.0     

 */  


2.類型(Types)註釋標籤(類的註釋):

[html] view plain copy print?

/**   

 * @ClassName:  ${type_name}   

 * @Description:${todo}(這裏用一句話描述這個類的做用)   

 * @author: Android_Robot  

 * @date:   ${date} ${time}   

 *   

 * ${tags}   

 */  


3.字段(Fields)註釋標籤:

[html] view plain copy print?

/**   

 * @Fields ${field} : ${todo}(用一句話描述這個變量表示什麼)   

 */   


4.構造函數標籤:

[html] view plain copy print?

/**   

 * @Title:  ${enclosing_type}   

 * @Description:    ${todo}(這裏用一句話描述這個方法的做用)   

 * @param:  ${tags}  

 * @throws   

 */  


5.方法(Methods)標籤:

[html] view plain copy print?

/**   

 * @Title: ${enclosing_method}   

 * @Description: ${todo}(這裏用一句話描述這個方法的做用)   

 * @param: ${tags}      

 * @return: ${return_type}      

 * @throws   

 */  

6.覆蓋方法(Overriding Methods)標籤:

[html] view plain copy print?

/**   

 * <p>Title: ${enclosing_method}</p>   

 * <p>Description: </p>   

 * ${tags}   

 * ${see_to_overridden}   

 */  


7.表明方法(Delegate Methods)標籤:

[html] view plain copy print?

/**  

 * ${tags}  

 * ${see_to_target}  

 */  


8.getter方法標籤:

[html] view plain copy print?

/**  

 * @Title:  ${enclosing_method} <BR>  

 * @Description: please write your description <BR>  

 * @return: ${field_type} <BR>  

 */  


9.setter方法標籤:

[html] view plain copy print?

/**  

 * @Title:  ${enclosing_method} <BR>  

 * @Description: please write your description <BR>  

 * @return: ${field_type} <BR>  

 */  

剩下的就默認了,^_^

相關文章
相關標籤/搜索