xref: /aosp_15_r20/sdk/annotations/src/android/annotation/TargetApi.java (revision 1789df15502f1991eff51ff970dce5df8404dd56)
1*1789df15SXin Li /*
2*1789df15SXin Li  * Copyright (C) 2012 The Android Open Source Project
3*1789df15SXin Li  *
4*1789df15SXin Li  * Licensed under the Apache License, Version 2.0 (the "License");
5*1789df15SXin Li  * you may not use this file except in compliance with the License.
6*1789df15SXin Li  * You may obtain a copy of the License at
7*1789df15SXin Li  *
8*1789df15SXin Li  *      http://www.apache.org/licenses/LICENSE-2.0
9*1789df15SXin Li  *
10*1789df15SXin Li  * Unless required by applicable law or agreed to in writing, software
11*1789df15SXin Li  * distributed under the License is distributed on an "AS IS" BASIS,
12*1789df15SXin Li  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*1789df15SXin Li  * See the License for the specific language governing permissions and
14*1789df15SXin Li  * limitations under the License.
15*1789df15SXin Li  */
16*1789df15SXin Li package android.annotation;
17*1789df15SXin Li 
18*1789df15SXin Li import static java.lang.annotation.ElementType.CONSTRUCTOR;
19*1789df15SXin Li import static java.lang.annotation.ElementType.METHOD;
20*1789df15SXin Li import static java.lang.annotation.ElementType.TYPE;
21*1789df15SXin Li 
22*1789df15SXin Li import java.lang.annotation.Retention;
23*1789df15SXin Li import java.lang.annotation.RetentionPolicy;
24*1789df15SXin Li import java.lang.annotation.Target;
25*1789df15SXin Li 
26*1789df15SXin Li /** Indicates that Lint should treat this type as targeting a given API level, no matter what the
27*1789df15SXin Li     project target is. */
28*1789df15SXin Li @Target({TYPE, METHOD, CONSTRUCTOR})
29*1789df15SXin Li @Retention(RetentionPolicy.CLASS)
30*1789df15SXin Li public @interface TargetApi {
31*1789df15SXin Li     /**
32*1789df15SXin Li      * This sets the target api level for the type..
33*1789df15SXin Li      */
value()34*1789df15SXin Li     int value();
35*1789df15SXin Li }
36