java - 显示导入包的名称,但被划掉

标签 java android eclipse xerces

我将 xercesImpl.jar 导入到我的 Android 项目中。

当我使用它时它似乎能识别它(即列出所有可用的方法),但名称被划掉了。有谁知道这是为什么吗?

最佳答案

因为该类或其方法是@Deprecated .

The @Deprecated annotation indicates that the marked element is deprecated and should no longer be used. The compiler generates a warning whenever a program uses a method, class, or field with the @Deprecated annotation. When an element is deprecated, it should also be documented using the Javadoc @deprecated tag, as shown in the following example. The use of the "@" symbol in both Javadoc comments and in annotations is not coincidental—they are related conceptually. Also, note that the Javadoc tag starts with a lowercase "d" and the annotation starts with an uppercase "D".

http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html

关于java - 显示导入包的名称,但被划掉,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8333939/

相关文章:

java - 平方根字符/符号

android - 检查 DialogFragment 中的 EditText 值

java - 在 Android 应用程序上跟踪用户 session

android - 获取用户是否已通过网络启用位置

eclipse - 缺少神器 log4j :log4j:bundle:1. 2.17

Android map API : Failed resolving interface

java - Android Java 将颜色设置为颜色变量

java - "Serializable"接口(interface)背后的基本原理是什么?

java - 尝试混淆时出现 NoSuchMapping 异常

Mac OSX 上的 Java 进程不释放套接字