`

myEclipse自动生成注释

阅读更多

首先参考该博客,http://chenzhou123520.iteye.com/blog/1625629,知道myEclipse工具中没个菜单都对应设置什么内容,然后具体设置时的各个标签详细解读一下:

模板内容:

/**
     *
     * @Description: ${enclosing_method}单元测试类
     * ${tags} ${return_type}
     * @throws
     * @author ${user}
     * @date ${date}
     * ${todo}(这里描述这个方法适用条件 – 可选).<br/>
     */

对应生成的注释:

/**
     *
         *
         * @Description: returnMsgJson单元测试类
         * @param resVo
         * @param jsonStr
         * @return String
         * @throws
         * @author Administrator
         * @date 2016-2-25
         * TODO(这里描述这个方法适用条件 – 可选).<br/>
     */
    public static String returnMsgJson(resultVo resVo,String jsonStr){  }

    解读:${enclosing_method}  生成方法名

               ${enclosing_type}  生成类名

       ${tags} 生成 * @param 参数名
                           * @param 参数名
                           * @return

${return_type}  生成 返回值类型

${user} 生成计算机名

${date} 生成 当前日期

${time} 生成 当前时间

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics