@SuppressWarnings("rawtypes")

@SuppressWarnings,表示警告抑制,告诉编译器不用提示相关的警告信息。

"rawtypes",这个参数是告诉编译器不用提示使用基本类型参数时相关的警告信息。一般是在通过传参调用某个方法的时候进行标识。

SuppressWarnings中类似的参数还有很多,比如:

  • 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)
  • javadoc: to suppress warnings relative to javadoc warnings
  • nls: to suppress warnings relative to non-nls string literals
  • null: to suppress warnings relative to null analysis
  • resource: to suppress warnings relative to usage of resources of type Closeable
  • 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
  • static-method: to suppress warnings relative to methods that could be declared as static
  • super: to suppress warnings relative to overriding a method without super invocations
  • synthetic-access: to suppress warnings relative to unoptimized access from inner classes
  • sync-override: to suppress warnings because of missing synchronize when overriding a synchronized method
  • 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 and dead code

 

 

引用:http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm

 

发布了246 篇原创文章 · 获赞 111 · 访问量 68万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览