mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Add SinceMirai and MiraiExperimentalAPI annotations
This commit is contained in:
parent
6844b108c0
commit
c3603832b0
@ -1,18 +1,31 @@
|
|||||||
package net.mamoe.mirai.utils
|
package net.mamoe.mirai.utils
|
||||||
|
|
||||||
|
import kotlin.annotation.AnnotationTarget.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标记这个类, 类型, 函数, 属性, 字段, 或构造器为一个仅供 Mirai 内部使用的 API.
|
* 标记为一个仅供 Mirai 内部使用的 API.
|
||||||
*
|
*
|
||||||
* 这些 API 可能会在任意时刻更改, 且不会发布任何预警.
|
* 这些 API 可能会在任意时刻更改, 且不会发布任何预警.
|
||||||
* 我们非常不建议使用这些 API.
|
* 非常不建议在发行版本中使用这些 API.
|
||||||
*/
|
*/
|
||||||
@Experimental(level = Experimental.Level.ERROR)
|
@Experimental(level = Experimental.Level.ERROR)
|
||||||
@Target(
|
@Target(CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR)
|
||||||
AnnotationTarget.CLASS,
|
internal annotation class MiraiInternalAPI
|
||||||
AnnotationTarget.TYPEALIAS,
|
|
||||||
AnnotationTarget.FUNCTION,
|
/**
|
||||||
AnnotationTarget.PROPERTY,
|
* 标记这个类, 类型, 函数, 属性, 字段, 或构造器为实验性的.
|
||||||
AnnotationTarget.FIELD,
|
*
|
||||||
AnnotationTarget.CONSTRUCTOR
|
* 这些 API 不具有稳定性, 且可能会在任意时刻更改.
|
||||||
)
|
* 不建议在发行版本中使用这些 API.
|
||||||
annotation class InternalAPI
|
*/
|
||||||
|
@Experimental(level = Experimental.Level.ERROR)
|
||||||
|
@Target(CLASS, TYPEALIAS, FUNCTION, PROPERTY, FIELD, CONSTRUCTOR)
|
||||||
|
internal annotation class MiraiExperimentalAPI
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标记这个 API 是自 Mirai 某个版本起才受支持.
|
||||||
|
*/
|
||||||
|
@Target(CLASS, PROPERTY, FIELD, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPEALIAS)
|
||||||
|
@Retention(AnnotationRetention.BINARY)
|
||||||
|
@MustBeDocumented
|
||||||
|
internal annotation class SinceMirai(val version: String)
|
||||||
|
Loading…
Reference in New Issue
Block a user