SuppressWarnings.java revision dd828f42a5c83b4270d4fbf6fce2da1878f1e84a
1/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package java.lang;
18
19import static java.lang.annotation.ElementType.CONSTRUCTOR;
20import static java.lang.annotation.ElementType.FIELD;
21import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
22import static java.lang.annotation.ElementType.METHOD;
23import static java.lang.annotation.ElementType.PARAMETER;
24import static java.lang.annotation.ElementType.TYPE;
25import static java.lang.annotation.RetentionPolicy.SOURCE;
26
27import java.lang.annotation.Retention;
28import java.lang.annotation.Target;
29
30/**
31 * Annotation type used to indicate that the compiler should not issue the
32 * specified warnings for the marked program element. Warnings are not only
33 * suppressed for the annotated element but also for all program elements
34 * contained in that element.
35 * <p>
36 * It is recommended that programmers always use this annotation on the most
37 * deeply nested element where it is actually needed.
38 * </p>
39 *
40 * @since Android 1.0
41 */
42@Target(value={TYPE,FIELD,METHOD,PARAMETER,CONSTRUCTOR,LOCAL_VARIABLE})
43@Retention(value=SOURCE)
44public @interface SuppressWarnings
45{
46    /**
47     * The list of warnings a compiler should not issue.
48     *
49     * @since Android 1.0
50     */
51    String[] value();
52}
53