• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 package kotlinx.coroutines
6 
7 import kotlinx.coroutines.flow.Flow
8 
9 /**
10  * Marks declarations that are still **experimental** in coroutines API, which means that the design of the
11  * corresponding declarations has open issues which may (or may not) lead to their changes in the future.
12  * Roughly speaking, there is a chance that those declarations will be deprecated in the near future or
13  * the semantics of their behavior may change in some way that may break some code.
14  */
15 @MustBeDocumented
16 @Retention(value = AnnotationRetention.BINARY)
17 @Experimental(level = Experimental.Level.WARNING)
18 public annotation class ExperimentalCoroutinesApi
19 
20 /**
21  * Marks [Flow]-related API as a feature preview.
22  *
23  * Flow preview has **no** backward compatibility guarantees, including both binary and source compatibility.
24  * Its API and semantics can and will be changed in next releases.
25  *
26  * Feature preview can be used to evaluate its real-world strengths and weaknesses, gather and provide feedback.
27  * According to the feedback, [Flow] will be refined on its road to stabilization and promotion to a stable API.
28  *
29  * The best way to speed up preview feature promotion is providing the feedback on the feature.
30  */
31 @MustBeDocumented
32 @Retention(value = AnnotationRetention.BINARY)
33 @Experimental(level = Experimental.Level.WARNING)
34 @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS, AnnotationTarget.PROPERTY)
35 public annotation class FlowPreview
36 
37 /**
38  * Marks declarations that are **obsolete** in coroutines API, which means that the design of the corresponding
39  * declarations has serious known flaws and they will be redesigned in the future.
40  * Roughly speaking, these declarations will be deprecated in the future but there is no replacement for them yet,
41  * so they cannot be deprecated right away.
42  */
43 @MustBeDocumented
44 @Retention(value = AnnotationRetention.BINARY)
45 @Experimental(level = Experimental.Level.WARNING)
46 public annotation class ObsoleteCoroutinesApi
47 
48 /**
49  * Marks declarations that are **internal** in coroutines API, which means that should not be used outside of
50  * `kotlinx.coroutines`, because their signatures and semantics will change between future releases without any
51  * warnings and without providing any migration aids.
52  */
53 @Retention(value = AnnotationRetention.BINARY)
54 @Experimental(level = Experimental.Level.ERROR)
55 @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS, AnnotationTarget.PROPERTY)
56 public annotation class InternalCoroutinesApi
57