In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
这篇文章给大家分享的是有关eclipse如何添加注释的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
设置注释模板的入口: Window->Preference->Java->Code Style->Code Template 然后展开Comments节点就是所有需设置注释的元素啦。现就每一个元素逐一介绍:
文件(Files)注释标签:
/**
* @Title: ${file_name}
* @Package ${package_name}
* @Description: ${todo}(用一句话描述该文件做什么)
* @author rex
* @date ${date} ${time}
* @version V1.0
*/
类型(Types)注释标签(类的注释):
/**
* @ClassName: ${type_name}
* @Description: ${todo}(这里用一句话描述这个类的作用)
* @author rex
* @date ${date} ${time}
*
* ${tags}
*/
字段(Fields)注释标签:
/**
* @Fields ${field} : ${todo}(用一句话描述这个变量表示什么)
*/
构造函数标签:
/**
*
Title:
*
Description:
* ${tags}
*/
方法(Constructor & Methods)标签:
/**
* @Title: ${enclosing_method}
* @Description: ${todo}(这里用一句话描述这个方法的作用)
* @param ${tags} 设定文件
* @return ${return_type} 返回类型
* @throws
*/
覆盖方法(Overriding Methods)标签:
/* (非 Javadoc)
*
Title: ${enclosing_method}
*
Description:
* ${tags}
* ${see_to_overridden}
*/
代表方法(Delegate Methods)标签:
/**
* ${tags}
* ${see_to_target}
*/
getter方法标签:
/**
* @return ${bare_field_name}
*/
setter方法标签:
/**
* @param ${param} 要设置的 ${bare_field_name}
*/感谢各位的阅读!关于"eclipse如何添加注释"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.