如何注释在Java类中去precation? [英] How to annotate deprecation of a class in Java?
本文介绍了如何注释在Java类中去precation?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要脱precate一类在Java中。
I am going to deprecate a class in Java.
@Deprecated
class deprecatedClass
和我有这个德precated类的列表中,
and I have list of this deprecated class,
List<deprecatedClass> listOfDeperecatedClass
所以我需要添加 @德precated
标签这份名单呢?
编辑: @德precated
应该有一个大写的'D'结果
请参阅: http://docs.oracle .COM / JavaSE的/ 7 /文档/ API / JAVA / LANG /德precated.html
@Deprecated
should have a capital 'D'.
See: http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html
推荐答案
你对列表
操作为您的公共接口的一部分?在这种情况下,标记所有这些方法为德pcated
太$ P $。否则,你应该罚款。
Do you have operations on the List
as part of your public interface? In that case, mark all those methods as deprecated
too. Otherwise you should be fine.
这篇关于如何注释在Java类中去precation?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文