src/share/classes/java/lang/SuppressWarnings.java
Print this page
@@ -24,11 +24,10 @@
*/
package java.lang;
import java.lang.annotation.*;
-import java.lang.annotation.ElementType;
import static java.lang.annotation.ElementType.*;
/**
* Indicates that the named compiler warnings should be suppressed in the
* annotated element (and in all program elements contained in the annotated
@@ -43,11 +42,11 @@
* method rather than its class.
*
* @since 1.5
* @author Josh Bloch
*/
-@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, TYPE_PARAMETER})
@Retention(RetentionPolicy.SOURCE)
public @interface SuppressWarnings {
/**
* The set of warnings that are to be suppressed by the compiler in the
* annotated element. Duplicate names are permitted. The second and