javadoc:@version 和@since [英] javadoc: @version and @since

查看:39
本文介绍了javadoc:@version 和@since的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有理由将 @version@since 作为类的一部分包含在内?

Is there a reason to include both @version and @since as part of a class?

它们似乎是相互排斥的.

They seem to be mutually exclusive.

另外,%I%%G% 是什么意思,如何设置/使用它们?

Also, what does %I% and %G% mean, and how to set/use them?

 @version %I%, %G%

推荐答案

@version 标签应该是相关发行版或文件的当前版本.%I%%G% 语法是源代码控制软件将替换为文件的当前版本和文件签出日期的宏.

The @version tag should be the current version of the release or file in question. The %I%, %G% syntax are macros that the source control software would replace with the current version of the file and the date when the file is checked out.

@since 标签应该用于定义你添加了哪个版本的方法、类等.这是你对其他开发人员的提示,他们应该只在针对特定的方法运行时才期望该方法包的版本.如果您将代码作为供其他人使用的库发送,我会考虑文档中这些非常重要的部分.

The @since tag should be used to define which version you added the method, class, etc. This is your hint to other developers that they should only expect the method when they run against a particular version of the package. I would consider these uber-important parts of the documentation if you're shipping your code as a library intended for someone else to use.

这篇关于javadoc:@version 和@since的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆