アノテーション

@SuppressWarnings

コンパイラ警告を抑える。むやみに使うヤツは死刑

  • unchecked - ジェネリックスの型チェック警告を抑える
  • deprecation - 非推奨メソッドの使用警告を抑える

複数の値を入れるときは

@SuppressWarnings({"deprecation","unchecked"})

指定できる値は以下のがあるらしい、意味は知らん。

"all","boxing", "dep-ann", "deprecation", "incomplete-switch", "hiding", 
"finally", "static-access", "nls", "serial", "synthetic-access", 
"unqualified-field-access", "unchecked", "unused", "warningToken"
 
java/annotation.txt · 最終更新: 2009/01/21 22:40 (外部編集)
 
特に明示されていない限り、本Wikiの内容は次のライセンスに従います:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki