Javadoc:指定兼容性,直到特定版本?
与我可以使用@since
标签指定最小兼容Java版本的方式类似,我想在我的Javadoc中指定最大兼容版本(EI表示我的类仅与版本兼容之前, Java 9)。
我已经看过@version
用于指定编译器版本的,但是很多Java代码都兼容了许多Java代码,因此我不确定这是否适用于指定界限。我还看到人们使用@deprecated
,并说“在Java 9中删除”。我不想贬低课程,因为暂时仅旨在与Java 8一起使用。
显然,我可以在Javadoc评论本身中简单地留言。但是我的好奇心使我变得更好。我可以为此目的使用Javadoc标签吗?
Similarly to how I can specify the minimum compatible Java version using the @since
tag, I'd like to specify in my JavaDoc the maximum compatible version (e.i. indicate that my class is only compatible with versions prior to Java 9).
I've seen @version
used to specify the compiler version, but a lot of Java code is forwards compatible so I'm not sure if this would work for specifying a bound. I've also seen people use @deprecated
with a message saying "removed in Java 9." I don't want to deprecate the class because for the time being it is only intended to be used with Java 8.
Obviously, I can simply leave a note in the JavaDoc comment itself. But my curiosity got the better of me. Is there a JavaDoc tag I can use for this purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论