From 060ed318738098e47e73d4fd4a706fbd8967c849 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 25 May 2020 18:20:57 +0800 Subject: [PATCH] Add JavaFriendlyAPI --- .../net/mamoe/mirai/console/utils/JavaFriendlyAPI.kt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/utils/JavaFriendlyAPI.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/utils/JavaFriendlyAPI.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/utils/JavaFriendlyAPI.kt new file mode 100644 index 000000000..23db91223 --- /dev/null +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/utils/JavaFriendlyAPI.kt @@ -0,0 +1,8 @@ +package net.mamoe.mirai.console.utils + +/** + * 表明这个 API 是为了让 Java 使用者调用更方便. Kotlin 使用者不应该使用这些 API. + */ +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS) +internal annotation class JavaFriendlyAPI