【IDEA】修改类文档的头部注释信息

IDEA-file-settings:

常用的预设变量:

${PACKAGE_NAME} - the name of the target package where the new class or interface will be created.
${PROJECT_NAME} - the name of the current project.
${FILE_NAME} - the name of the PHP file that will be created.
${NAME} - the name of the new file which you specify in the New File dialog box during the file creation.
${USER} - the login name of the current user.
${DATE} - the current system date.
${TIME} - the current system time.
${YEAR} - the current year.
${MONTH} - the current month.
${DAY} - the current day of the month.
${HOUR} - the current hour.
${MINUTE} - the current minute.
${PRODUCT_NAME} - the name of the IDE in which the file will be created.
${MONTH_NAME_SHORT} - the first 3 letters of the month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL} - full name of a month. Example: January, February, etc.
 
本文采用的预定义信息:
/**
@className: ${PACKAGE_NAME}.${NAME}
@description: TODO
@author: tommy
@create: ${YEAR}-${MONTH}-${DAY} ${TIME}
*/

 

设置好后,新建一个类:

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
idea2022 文件头部注释是指在一个 Java 文件的开头部分添加一段注释内容,用于描述这个的基本信息、功能、作者和版本等相关信息。 一般情况下,一个文件头部注释应包含以下内容: 1. 文件名和位置:注释应该标明这个文件文件名以及存放位置,以方便其他开发人员在需要时能够快速定位到这个文件。 2. 名和包名:注释应该标明这个名和所属的包名,以方便其他开发人员在阅读代码时能够准确地了解这个的功能。 3. 功能描述:注释应该简要地描述这个的主要功能和用途,以便其他开发人员在使用这个时能够知道它的作用。 4. 作者信息注释应该标明这个的作者姓名以及编写日期,以方便其他开发人员在需要时能够联系到作者并了解代码的编写背景。 5. 版本信息注释应该标明这个的版本信息,包括版本号、修改日期等,以便其他开发人员在进行版本迭代时能够清楚地了解代码的变更历史。 一个典型的文件头部注释的例子如下: ``` /** * 文件名: Idea2022.java * 位置: com.example * 名: Idea2022 * 包名: com.example * * 功能描述: 这个是用于实现某个功能的核心,主要用于处理某些特定业务逻辑。 * * 作者: 张三 * 编写日期: 2022年1月1日 * * 版本: 1.0 * 修改日期: 2022年1月10日 */ ``` 通过在文件头部添加注释,可以使代码更具可读性和可维护性,方便他人理解和使用代码,并减少开发过程中的沟通成本。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值