http://www.breakitdownblog.com/supported-values-for-suppresswarnings/
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
-
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
TIP: For the folks that haven’t used @SuppressWarnings before, the syntax looks like this:
@SuppressWarnings(”unused”)
and can be placed above almost any piece of code that is causing a compiler warning to popup for your class.
分享到:
相关推荐
JAVA连接hive/hbase/sparksql/hdfs,kerbers认证失败 报no supported default etypes for default_tkt_enctypes ,需要更新jdk8的安全jar包,用来处理keytab文件,可以在oracle官网下,但是要注册账号,也可以下我的...
Supported Configurations for Oracle WebLogic Server 10.3
老师当时给我们发的,保存一下,以后观看。另外还有一个专门做词云的网页。
ERROR:ABIs [armeabi] are not supported for platform.Supported ABIs are [arm64-v8a, armeabi-v7的完美解决方案-附件资源
基于python实现的的免安装词云生成器——使用python实现文章的词云图的绘制,然后需要具有交互界面,并且能够在没有python环境的电脑下运行,方便不懂编程的人直接使用。
At present, cable supported bridges are enabled for spans in the range from 200 m to 2000 m (and beyond), thus covering approximately 90 per cent of the present span range. For the vast majority of ...
解决SVN上传提示Empty directoriesis not supported 解决SVN上传提示Empty directoriesis not supported
How to create and use Hive Functions, Listing of Built-In Functions that are supported in Hive
铁(III)金属-有机凝胶作为负载催化剂催化环氧化物醇解反应,杨秋丽,相升林,将1,3,5-苯三甲酸和铁盐在不同的醇溶剂中简单地混合得到了一系列金属-有机凝胶。通过SEM和TEM表征了凝胶的海绵状多孔网络结构。...
SAP Crystal Reports 2008 SP5 for Windows - Supported Platforms
网上各种教程无法解决这个工具提示 not supported not listening问题,这个安装包给出了所有需要的文件,并给出了详细的指引。 绝大多数情况你会安装成功。如果你成功了,或者失败了,请给我评论。大家看评论区。
Warning: the AUFS storage driver is deprecated in boot2docker and AUFS support is removed in 18.09+. You can continue with AUFS in boot2docker 18.06.x, but it is ... See #1326 for more discussion.
Sharing is only supported for boot loader classes because bootstrap classpath has been appended 出现这个的原因是因为使用了共享类数据,你可能t同时使用了 -Xbootclasspath/a 和 CDS (或者 AppCDS) 这个...
Unfortunately, my Android phone (Samsung GS8 ) was not on the supported list, and apps built with ARCore exit at start on my device. However, its hardware actually can run ARCore! I modified the ...
Git 2.9.2 for windows 64 更新
Table of supported device for Java Verified.
Our dOPC Client Toolkit for Delphi is probably one of the most used OPC component collections for Delphi worldwide. In addition, there are a number of good reasons why you should purchase our OPC ...
在启动Oracle数据库时提示:ORA-00845 MEMORY_TARGET not supported on this system错误,解决办法
Y-axis with auto ranging, minor & major value indication along Y-axis, multiple Y-axis values for different series supported Support for annotations & legend Panes with scrolling, scaling, splitter,...