定义前面加:@Deprecated
参见:java.lang.Deprecated类。
java.lang
Annotation Type Deprecated
-
@Documented
@Retention(value=RUNTIME)
public @interface Deprecated
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists. Compilers warn when a deprecated program element is used or overridden in non-deprecated code.
Since: 1.5
posted on 2009-06-26 10:37
胖胖泡泡 阅读(172)
评论(0) 编辑 收藏