Android系统之@SuppressWarnings的用途
来源:互联网 发布:好吃的零食 知乎 编辑:程序博客网 时间:2024/06/09 23:19
在Java编译过程中会出现很多警告,有很多是安全的,但是每次编译有很多警告影响我们对error的过滤和修改,我们可以在代码中加上
@SuppressWarnings(“XXXX”) 来解决
例如:@SuppressWarnings("deprecation")表示不显示使用了不赞成使用的类或方法时的警告
- all to suppress all warnings
- boxing to suppress warnings relative to boxing/unboxing operations
- cast to suppress warnings relative to cast operations
- dep-ann to suppress warnings relative to deprecated annotation
- deprecation to suppress warnings relative to deprecation
- fallthrough to suppress warnings relative to missing breaks in switch statements
- finally to suppress warnings relative to finally block that don’t return
- hiding to suppress warnings relative to locals that hide variable
- incomplete-switch to suppress warnings relative to missing entries in a switch statement (enum case)
- nls to suppress warnings relative to non-nls string literals
- null to suppress warnings relative to null analysis
- rawtypes to suppress warnings relative to un-specific types when using generics on class params
- restriction to suppress warnings relative to usage of discouraged or forbidden references
- serial to suppress warnings relative to missing serialVersionUID field for a serializable class
- static-access to suppress warnings relative to incorrect static access
- synthetic-access to suppress warnings relative to unoptimized access from inner classes
- unchecked to suppress warnings relative to unchecked operations
- unqualified-field-access to suppress warnings relative to field access unqualified
- unused to suppress warnings relative to unused code
阅读全文
0 0
- Android系统之@SuppressWarnings的用途
- android 之 MeasureSpec 的用途
- Android之Inflate()方法用途--转载的
- 系统调用的用途
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- Android之android.intent.category.LAUNCHER的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- android之android.intent.category.DEFAULT的用途和使用
- Android C++的用途
- android:contentDescription 的用途
- ROS机器人操作系统在线练习
- 阅读QtCreator--常见文件操作的实现
- jvm分析步骤
- c结构体
- Android使用JobService实现后台服务
- Android系统之@SuppressWarnings的用途
- 有效回文串
- POJ 3279(Fliptile)题解
- HttpSession案例笔记
- Android判断App是否在前台运行
- spring面试题
- orientdb 第一次启动设置密码
- H
- Android使用SoundPool播放短音效