`

@SuppressWarnings抑制警告的关键字

    博客分类:
  • Java
 
阅读更多
关键字 用途
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 o 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

分享到:
评论

相关推荐

    @SuppressWarnings

    )下面是一个清单: 关键字 用途 deprecation 使用了不赞成使用的类或方法时的警告 unchecked 执行了未检查的转换时的警告,例如当使用集合时没有用泛型 (Generics) 来指定集合保存的类型。 fallthrough 当 Switch ...

    关于@SuppressWarnings("uncheck ")(转)

    关于@SuppressWarnings("uncheck ")

    Java分组、分页源码

    @SuppressWarnings("unused") private List pageList;// 存放分页中5页信息 @SuppressWarnings("unused") private boolean isFirstPage;// 是否为第一页 @SuppressWarnings("unused") private boolean ...

    @SuppressWarnings简介

    :java.lang.SuppressWarnings是J2SE 5.0中标准的Annotation之一。可以标注在类、字段、方法、参数、构造方法,以及局部变量上。

    jsp图书馆管理系统毕业设计

    @SuppressWarnings("unchecked") public List getBookcase(); public Bookcase getBookcaseById(Long id); public boolean validateByName(String name); public int allRowCount(); @...

    flume-plugin-maven-plugin-1.0.zip

    suppress-warnings.zip,@suppressWarnings注释的常量@suppressWarnings注释的常量

    java写字板字体文件类源代码

    @SuppressWarnings("static-access") public FontFrame(MyNotepad myNotepad){ @SuppressWarnings("unused") int i = this.showConfirmDialog(myNotepad, createJPanel(), "字体", JOptionPane.OK_CANCEL_...

    ssh 万能类分页系统,可复用!

    @SuppressWarnings("unused") private boolean isFirstPage;//是否为第一页 @SuppressWarnings("unused") private boolean isLastPage;//是否为最后一页 @SuppressWarnings("unused") private boolean has...

    观看韩顺平学习整理java的笔记到异常

    帮助大家复习java基础知识其中有 hashCode 2 ...@SuppressWarnings 注解 17 元注解 19 @Retention 注解 19 @Target 注解 19 @Documented注解 20 @Inherited 注解 20 异常-Exception 21 编译异常 22 异常处理 2

    俄罗斯方块

    @SuppressWarnings("serial") class ERS_Block extends Frame { public static boolean isPlay=false; public static int level=1,score=0; public static TextField scoreField,levelField; public static ...

    java编写根据模板导出excel

    @SuppressWarnings({ "rawtypes", "unchecked" }) public void exportAndDownload(String templateFile, List<HashMap> datas) { try { filename = UUID.randomUUID() + templateFile; // FacesContext ...

    ibatis例子=》包含了常用方法介绍

    @SuppressWarnings("unchecked") public Map queryForMap(String sql_name, Object parameterObject, String keyProp,String valueProp) { Map map = null; try { map = sqlMap.queryForMap(sql_name, ...

    计算器java源码

    @SuppressWarnings("serial") public class testCalculator extends Frame { GridLayout g1; Button b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15; Panel p1,p2; Double x,y; JTextField tf1 = ...

    zxing.jar java生成二维码

    @SuppressWarnings("rawtypes") Map map = new HashMap(); //设置二维码的级别 map.put(EncodeHintType.ERROR_CORRECTION,ErrorCorrectionLevel.M); //设置二维码中文本的编码格式 map.put(EncodeHintType....

    hbase创建二级索引

    @SuppressWarnings("deprecation") @Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { //获取所有需要建索引的列 Set[]> keys...

    Java常用内置注解用法分析

    主要介绍了Java常用内置注解用法,结合实例形式分析了java使用@SuppressWarnings关闭警告信息以及@Depreca标注的元素不使用两种注解使用方法,需要的朋友可以参考下

    java网络编程抓取指定网页信息--UrlHtml(java源码)

    @SuppressWarnings("deprecation") public static void main(String[] s) throws IOException{ try { URL url = new URL("http://www.kum.net.cn"); DataInputStream in = new DataInputStream(url.open...

    JavaSE-注解与反射(框架底层实现机制)

    @SuppressWarnings:镇压警告 元注解(meta-annotation): 可自定义注解 @Target:描述注解的使用范围,传入value参数指定 @Retention:描述注解的生命周期,传入value参数指定 (runtime>class>sources) @...

    minboo#JavaSE#2.注解的使用1

    1. 注解的理解 2. 注解的使用示例 3. 如何自定义注解:参照@SuppressWarnings定义 4. 元注解 :对现有的注解进行解释说明的注解 5.

    BluetoothDemoV1.2

    @SuppressWarnings("unused") private static final int REQUEST_ENABLE = 0x1; private static final int REQUEST_EX = 1; /* 请求能够被搜索 */ private static final int REQUEST_DISCOVERABLE = 0x2; ...

Global site tag (gtag.js) - Google Analytics