1 /*
2  * Copyright 2020 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 
17 package androidx.compose.runtime.internal
18 
19 import androidx.compose.runtime.ComposeCompilerApi
20 
21 /**
22  * This annotation is applied to the FunctionKeyMeta classes created by the Compose Compiler. These
23  * classes will have multiple of these annotations, each one corresponding to a single composable
24  * function. The annotation holds some metadata about the function itself and is intended to be used
25  * to provide information useful to tooling.
26  *
27  * @param key The key used for the function's group.
28  * @param startOffset The startOffset of the function in the source file at the time of compilation.
29  * @param endOffset The startOffset of the function in the source file at the time of compilation.
30  */
31 @ComposeCompilerApi
32 @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
33 @Retention(AnnotationRetention.RUNTIME)
34 @Repeatable
35 annotation class FunctionKeyMeta(val key: Int, val startOffset: Int, val endOffset: Int)
36 
37 /**
38  * This annotation is applied to the FunctionKeyMeta classes created by the Compose Compiler. This
39  * is intended to be used to provide information useful to tooling.
40  *
41  * @param file The file path of the file the associated class was produced for
42  */
43 @ComposeCompilerApi
44 @Target(AnnotationTarget.CLASS)
45 @Retention(AnnotationRetention.RUNTIME)
46 annotation class FunctionKeyMetaClass(val file: String)
47