- 浏览: 513940 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (563)
- 工作经验 (12)
- 数据库 (13)
- Servlet (10)
- Struts2 (1)
- Spring (25)
- Eclipse (5)
- Hibernate (5)
- Eclips (8)
- HTTP (7)
- J2EE (21)
- EHcache (1)
- HTML (11)
- 工具插件使用 (20)
- JPA (2)
- 杂谈 (17)
- 数据结构与算法 (3)
- Cloud Foundry (1)
- 安全 (10)
- J2SE (57)
- SQL (9)
- DB2 (6)
- 操作系统 (2)
- 设计模式 (1)
- 版本代码管理工具 (13)
- 面试 (10)
- 代码规范 (3)
- Tomcat (12)
- Ajax (5)
- 异常总结 (11)
- REST (2)
- 云 (2)
- RMI (3)
- SOA (1)
- Oracle (12)
- Javascript (20)
- jquery (7)
- JSP自定义标签 (2)
- 电脑知识 (5)
- 浏览器 (3)
- 正则表达式 (3)
- 建站解决问题 (38)
- 数据库设计 (3)
- git (16)
- log4j (1)
- 每天100行代码 (1)
- socket (0)
- java设计模式 耿祥义著 (0)
- Maven (14)
- ibatis (7)
- bug整理 (2)
- 邮件服务器 (8)
- Linux (32)
- TCP/IP协议 (5)
- java多线程并发 (7)
- IO (1)
- 网页小工具 (2)
- Flash (2)
- 爬虫 (1)
- CSS (6)
- JSON (1)
- 触发器 (1)
- java并发 (12)
- ajaxfileupload (1)
- js验证 (1)
- discuz (2)
- Mysql (14)
- jvm (2)
- MyBatis (10)
- POI (1)
- 金融 (1)
- VMWare (0)
- Redis (4)
- 性能测试 (2)
- PostgreSQL (1)
- 分布式 (2)
- Easy UI (1)
- C (1)
- 加密 (6)
- Node.js (1)
- 事务 (2)
- zookeeper (3)
- Spring MVC (2)
- 动态代理 (3)
- 日志 (2)
- 微信公众号 (2)
- IDEA (1)
- 保存他人遇到的问题 (1)
- webservice (11)
- memcached (3)
- nginx (6)
- 抓包 (1)
- java规范 (1)
- dubbo (3)
- xwiki (1)
- quartz (2)
- 数字证书 (1)
- spi (1)
- 学习编程 (6)
- dom4j (1)
- 计算机系统知识 (2)
- JAVA系统知识 (1)
- rpcf (1)
- 单元测试 (2)
- php (1)
- 内存泄漏cpu100%outofmemery (5)
- zero_copy (2)
- mac (3)
- hive (3)
- 分享资料整理 (0)
- 计算机网络 (1)
- 编写操作系统 (1)
- springboot (1)
最新评论
-
masuweng:
亦论一次OutOfMemoryError的定位与解错 -
变脸小伙:
引用[color=red][/color]百度推广中运用的技术 ...
Spring 3 mvc中返回pdf,json,xml等不同的view -
Vanillva:
不同之处是什么??
Mybatis中的like查询 -
thrillerzw:
转了。做个有理想的程序员
有理想的程序员必须知道的15件事 -
liujunhui1988:
觉得很有概括力
15 个必须知道的 Java 面试问题(2年工作经验)
源:http://www.miss77.net/558.html
http://hi.baidu.com/niuzaiwenjie/item/e373a585a99fff14c216274f
评:
SuppressWarnings压制警告,即去除警告
rawtypes是说传参时也要传递带泛型的参数
rawtypes to suppress warnings relative to un-specific types when using generics on class params
rawtypes阶级PARAMS使用泛型时,抑制相对于非特定类型的警告
Update #1: All these annotations are still valid in Eclipse 3.4 and 3.5, there have been no new SuppressWarning arguments added in those versions of the JDT compiler.
If you are a Java developer and use the new @SuppressWarnings annotation in your code from time-to-time to suppress compiler warnings you, like me, have wondered probably about a million times already just exactly what are the supported values that can be used with this annotation.
The reason the list isn’t easy to find is because it’s compiler specific, which means Sun may have a different set of supported values than say IBM, GCJ or Apache Harmony.
Fortunately for us, the Eclipse folks have documented the values they support (As of Eclipse 3.3), here they are for reference:
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
http://hi.baidu.com/niuzaiwenjie/item/e373a585a99fff14c216274f
评:
SuppressWarnings压制警告,即去除警告
rawtypes是说传参时也要传递带泛型的参数
rawtypes to suppress warnings relative to un-specific types when using generics on class params
rawtypes阶级PARAMS使用泛型时,抑制相对于非特定类型的警告
Update #1: All these annotations are still valid in Eclipse 3.4 and 3.5, there have been no new SuppressWarning arguments added in those versions of the JDT compiler.
If you are a Java developer and use the new @SuppressWarnings annotation in your code from time-to-time to suppress compiler warnings you, like me, have wondered probably about a million times already just exactly what are the supported values that can be used with this annotation.
The reason the list isn’t easy to find is because it’s compiler specific, which means Sun may have a different set of supported values than say IBM, GCJ or Apache Harmony.
Fortunately for us, the Eclipse folks have documented the values they support (As of Eclipse 3.3), here they are for reference:
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
发表评论
-
BeanCopier系列之一:特性测试
2018-06-12 12:15 432源:http://czj4451.iteye.com/ ... -
Lombok 之 ToString
2018-03-20 19:35 650源:http://himichaelchu.iteye.com ... -
extends和super的区别
2018-01-14 19:05 589源:http://bbs.csdn.net/topics/38 ... -
double转BigDecimal,数变大
2017-09-09 14:02 612源:http://blog.csdn.net/linbrain ... -
循环依赖检测方法 spring源码方法
2016-07-06 18:58 1165场景:checkForAliasCircle(name, al ... -
Oracle模糊查询之(4.采用全文索引解决模糊查询,给出具体步骤)采用全文索引解决模糊查询速度慢的问题[主文]
2016-03-24 16:16 850源:http://blog.csdn.net/haiross/ ... -
理解和正确使用Java中的断言(assert)
2016-03-24 15:55 1077源:http://blog.csdn.net/leic ... -
string stringbuffer stringbuilder区别
2016-03-07 15:39 452string 是不可变类,内部数据结构为final char数 ... -
接口和抽象类有什么区别
2015-11-27 15:58 434源:http://m.blog.csdn.net/bl ... -
Java中Enum类型的序列化
2015-11-25 14:57 1235源:http://mysun.iteye.com/blog/1 ... -
serialVersionUID的作用
2015-11-08 15:27 580源:http://www.cnblogs.com/gu ... -
dom4j写xml时&会被转义成&的解决方法?
2015-09-08 20:52 983源:http://www.iteye.com/problems ... -
java ImageIO处理图像的封装
2015-09-06 10:17 364源:http://blog.csdn.net/hu_sheng ... -
XML 和 java对象相互转换
2015-08-17 16:45 0源:http://hbiao68.iteye.com/blog ... -
java 版本更迭
2015-08-03 10:19 601源:https://en.wikipedia.org/wiki ... -
谈抽象类与接口的区别之一
2015-04-23 11:46 537源:http://wenku.baidu.com/li ... -
Java基本数据类型
2015-04-17 14:57 681源:http://blog.csdn.net/zuolongs ... -
JAVA深复制(深克隆)与浅复制(浅克隆)
2015-04-17 14:23 431源:http://www.cnblogs.com/yxnchi ... -
java中的四种访问权限是?
2015-04-16 17:58 543源:http://zhidao.baidu.com/link? ... -
DMA Direct Memory Access(存储器直接访问)
2015-04-02 15:55 563源:http://baike.baidu.com/li ...
相关推荐
### 关于@SuppressWarnings("unchecked")详解 在Java编程中,`@SuppressWarnings` 是一个非常有用的注解,它允许开发者暂时忽略某些编译警告。这在处理一些已知但并不影响程序运行安全性的警告时非常有用。本文将...
`@SuppressWarnings` 是 Java 编程语言中的一个注解,它在 J2SE 5.0 版本中被引入,用于控制编译时的警告信息。这个注解的目的是让程序员能够选择性地抑制(忽略)特定类型的编译器警告,避免在代码中看到这些警告,...
在Java编程语言中,`@SuppressWarnings`是一个非常实用的注解,它允许开发者有选择性地忽略编译器发出的警告。这对于优化代码质量和可读性尤其重要,尤其是在处理一些已知但不会对程序功能产生直接影响的问题时。...
### Java SuppressWarnings详解 在Java开发过程中,经常会遇到编译器警告的问题,这些警告虽然不会阻止程序的编译和运行,但过多的警告会影响代码的可读性和维护性。为了解决这一问题,Java提供了`@...
### Java中的@SuppressWarnings详解 #### 一、@SuppressWarnings("serial")的理解与应用 ##### 1.1 注解概述 `@SuppressWarnings("serial")` 是 Java 中一个重要的注解,用于抑制有关 `serialVersionUID` 的编译...
对于 `@SuppressWarnings` 批注,需要指定要取消的警告类型,例如 `@SuppressWarnings("unchecked")` 用于取消未检查的转换警告。可以使用 `-Xlint` 参数来控制警告的报告。 使用 `@SuppressWarnings` 批注可以提高...
@SuppressWarnings("unused") private List pageList;// 存放分页中5页信息 @SuppressWarnings("unused") private boolean isFirstPage;// 是否为第一页 @SuppressWarnings("unused") private boolean ...
下面将详细解释如何处理这些黄色警告,并探讨几种常见的`@SuppressWarnings`注解。 ### `@SuppressWarnings("unchecked")` 当你的代码涉及到泛型(Generics)时,如果IDE检测到未检查的转换,即对类型进行了未经...
@SuppressWarnings("unchecked") public List getBookcase(); public Bookcase getBookcaseById(Long id); public boolean validateByName(String name); public int allRowCount(); @...
《Flume Plugin Maven 插件与 @SuppressWarnings 注解解析》 在IT行业中,构建高效、可靠的软件系统是一项挑战,而工具的选择与使用则至关重要。本文将深入探讨一个名为"flume-plugin-maven-plugin-1.0.zip"的开源...
注解(Annotation)是Java语言中的一个重要特性...通过使用`@Override`来确保方法重写正确,`@Deprecated`来标记不再推荐使用的代码,以及`@SuppressWarnings`来控制编译警告,开发者能够更好地管理和优化他们的代码。
此外,可以使用`value`参数来指定多个要抑制的警告类型,如`@SuppressWarnings(value={"unchecked", "deprecation"})`。 4. 自定义Annotation:除了内置的注解,Java允许开发者创建自己的注解类型。例如,`Debug`是...
例如,`@SuppressWarnings`注解有一个名为`value`的元素,用于指定要忽略的警告类别。 `@SuppressWarnings`注解通常用于抑制编译器发出的特定警告。如在代码中,`@SuppressWarnings("rawtypes")`会阻止编译器对使用...
3. **`@SuppressWarnings`**:`@SuppressWarnings` 注解可以用来抑制编译器发出的警告。比如在`SomeClass`中,由于使用了未指定类型的`HashMap`,编译器发出了未检查操作的警告。通过在`doSomething`方法上添加`@...
@SuppressWarnings("static-access") public FontFrame(MyNotepad myNotepad){ @SuppressWarnings("unused") int i = this.showConfirmDialog(myNotepad, createJPanel(), "字体", JOptionPane.OK_CANCEL_...
@SuppressWarnings("unused") private boolean isFirstPage;//是否为第一页 @SuppressWarnings("unused") private boolean isLastPage;//是否为最后一页 @SuppressWarnings("unused") private boolean has...
本文将从JDK源注释出发,深入解析三种核心注释类型:`@SuppressWarnings`、`@Deprecated`以及`@Override`,并探讨自定义注解的创建与应用。 #### 1. `@SuppressWarnings` `@SuppressWarnings`注解用于抑制编译器的...