[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Patch: FYI: document SuppressWarnings
From: |
Tom Tromey |
Subject: |
[cp-patches] [generics] Patch: FYI: document SuppressWarnings |
Date: |
07 Sep 2004 20:33:53 -0600 |
I'm checking this in on the generics branch.
This documents the SuppressWarnings attribute.
Tom
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.2386.2.19
diff -u -r1.2386.2.19 ChangeLog
--- ChangeLog 8 Sep 2004 00:45:40 -0000 1.2386.2.19
+++ ChangeLog 8 Sep 2004 01:34:40 -0000
@@ -1,5 +1,7 @@
2004-09-07 Tom Tromey <address@hidden>
+ * java/lang/SuppressWarnings.java: Document.
+
* java/lang/StringBuilder.java: New file.
* java/lang/String.java (String(StringBuilder)): New constructor.
* java/lang/StringBuffer.java: Added comment.
Index: java/lang/SuppressWarnings.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Attic/SuppressWarnings.java,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 SuppressWarnings.java
--- java/lang/SuppressWarnings.java 5 Sep 2004 00:53:04 -0000 1.1.2.2
+++ java/lang/SuppressWarnings.java 8 Sep 2004 01:34:41 -0000
@@ -42,9 +42,28 @@
import static java.lang.annotation.RetentionPolicy.SOURCE;
import static java.lang.annotation.ElementType.*;
+/**
+ * Tell the compiler that a given warning should be suppressed when it
+ * pertains to the marked program element and its sub-elements.
+ *
+ * Note that warning suppression is additive. For instance if a
+ * constructor has a warning suppressed, and a local variable in the
+ * constructor has a different warning suppressed, then the resulting
+ * set of suppressed warnings for that variable will be both warnings.
+ *
+ * @since 1.5
+ */
@Retention(SOURCE)
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
public @interface SuppressWarnings
{
+ /**
+ * The list of warnings to suppress.
+ *
+ * It is valid to list a name more than once. Unrecognized names
+ * are not a compile-time error. At the present there is no
+ * standard for the names to be recognized by compilers; consult
+ * your compiler's documentation for this information.
+ */
String[] value ();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Patch: FYI: document SuppressWarnings,
Tom Tromey <=