42 |
import static java.lang.annotation.RetentionPolicy.SOURCE; |
import static java.lang.annotation.RetentionPolicy.SOURCE; |
43 |
import static java.lang.annotation.ElementType.*; |
import static java.lang.annotation.ElementType.*; |
44 |
|
|
45 |
|
/** |
46 |
|
* Tell the compiler that a given warning should be suppressed when it |
47 |
|
* pertains to the marked program element and its sub-elements. |
48 |
|
* |
49 |
|
* Note that warning suppression is additive. For instance if a |
50 |
|
* constructor has a warning suppressed, and a local variable in the |
51 |
|
* constructor has a different warning suppressed, then the resulting |
52 |
|
* set of suppressed warnings for that variable will be both warnings. |
53 |
|
* |
54 |
|
* @since 1.5 |
55 |
|
*/ |
56 |
@Retention(SOURCE) |
@Retention(SOURCE) |
57 |
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE}) |
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE}) |
58 |
public @interface SuppressWarnings |
public @interface SuppressWarnings |
59 |
{ |
{ |
60 |
|
/** |
61 |
|
* The list of warnings to suppress. |
62 |
|
* |
63 |
|
* It is valid to list a name more than once. Unrecognized names |
64 |
|
* are not a compile-time error. At the present there is no |
65 |
|
* standard for the names to be recognized by compilers; consult |
66 |
|
* your compiler's documentation for this information. |
67 |
|
*/ |
68 |
String[] value (); |
String[] value (); |
69 |
} |
} |