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

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

问题描述

有没有理由将 @version和@since 同时包含在一起?



他们似乎是相互排斥的。



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

  @version%I%,%G%
/ pre>

谢谢

解决方案

@version 标签应该是当前版本的发行版或文件。 %I%%G%语法是源控制软件将替换当前版本的文件和文件检出日期。



应该使用 @since 标签来定义哪个版本您添加了方法,类等。这是您对其他开发人员的暗示,他们应该只期望该方法在针对特定版本的包运行时。如果您将代码作为图书馆供其他人使用,我会考虑这些重要的文档部分。


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

They seem to be mutually exclusive.

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

 @version %I%, %G% 

thanks

解决方案

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.

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天全站免登陆