原文:https://blog.csdn.net/qq_44438941/article/details/132213813
1.在eclipse中点击Window——>java——>Code Style——>CodeTemplates——>Comments
2.常用Variable
3. 我的注释模板
①Files 文件
/** * @Title: ${file_name}* @Description: ${todo}* @author Jeremy* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} */
②Types 类
/** * @ClassName: ${type_name}* @Description: ${todo}* @author Jeremy* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
④Constructors 构造函数
/** * @Constructor: ${enclosing_type}* @Description: ${enclosing_type}构造函数* @author Jeremy* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} */
⑤Methods 方法
/** * @MethodName: ${enclosing_method}* @Description: ${todo}* @author Jeremy* ${tags} ${return_type}* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} */
⑥Overriding methods 重写方法
/** * @MethodName: ${enclosing_method}* @Description: ${todo}* @author Jeremy* ${tags}* ${see_to_overridden}* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')} */
4.如何使用注释
选中类、方法名 用快捷键Alt+Shift+J 快速添加注释
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_44438941/article/details/132213813