KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > annotations > SuppressWarnings


1 /*
2  * Bytecode Analysis Framework
3  * Copyright (C) 2005 University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package edu.umd.cs.findbugs.annotations;
20
21 import java.lang.annotation.ElementType JavaDoc;
22 import java.lang.annotation.Retention JavaDoc;
23 import java.lang.annotation.RetentionPolicy JavaDoc;
24 import java.lang.annotation.Target JavaDoc;
25
26 @Target JavaDoc({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD,
27          ElementType.PARAMETER, ElementType.CONSTRUCTOR,
28          ElementType.LOCAL_VARIABLE, ElementType.PACKAGE})
29 @Retention JavaDoc(RetentionPolicy.CLASS)
30 public @interface SuppressWarnings {
31     /**
32      * The set of warnings that are to be suppressed by the compiler in the
33      * annotated element.
34      *
35      * Duplicate names are permitted. The second and
36      * successive occurrences of a name are ignored. The presence of
37      * unrecognized warning names is <i>not</i> an error: Compilers must
38      * ignore any warning names they do not recognize. They are, however,
39      * free to emit a warning if an annotation contains an unrecognized
40      * warning name.
41      *
42      * <p>Compiler vendors should document the warning names they support in
43      * conjunction with this annotation type. They are encouraged to cooperate
44      * to ensure that the same names work across multiple compilers.
45      */

46     String JavaDoc[] value() default {};
47     String JavaDoc justification() default "";
48 }
49
Popular Tags