1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 04:50:26 +08:00

kdocs; keep old internal constructor

This commit is contained in:
Karlatemp 2023-07-20 17:00:54 +08:00
parent f53772682d
commit 9bb6af7211
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59
4 changed files with 23 additions and 0 deletions
mirai-console/backend/mirai-console
compatibility-validation/jvm/api
src/plugin/jvm

View File

@ -1958,6 +1958,7 @@ public final class net/mamoe/mirai/console/plugin/description/PluginDescription$
}
public abstract class net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin : net/mamoe/mirai/console/internal/plugin/JvmPluginInternal, net/mamoe/mirai/console/data/AutoSavePluginDataHolder, net/mamoe/mirai/console/plugin/jvm/JvmPlugin {
public fun <init> ()V
public fun <init> (Lkotlin/coroutines/CoroutineContext;)V
public synthetic fun <init> (Lkotlin/coroutines/CoroutineContext;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Lnet/mamoe/mirai/console/plugin/jvm/JvmPluginDescription;)V

View File

@ -43,6 +43,7 @@ public abstract class AbstractJvmPlugin : JvmPluginInternal, JvmPlugin, AutoSave
this.description = description
}
@JvmOverloads
public constructor(parentCoroutineContext: CoroutineContext = EmptyCoroutineContext) : super(parentCoroutineContext) {
this.description = javaClass.loadPluginDescriptionFromClassLoader()
}

View File

@ -19,12 +19,22 @@ import kotlin.coroutines.EmptyCoroutineContext
*/
public abstract class JavaPlugin : JvmPlugin, AbstractJvmPlugin {
/**
* 通过一个指定的 [JvmPluginDescription] 构造插件示例
*
* 当使用 `plugin.yml` 加载插件示例时不能使用此构造器
*/
@JvmOverloads
public constructor(
description: JvmPluginDescription,
parentCoroutineContext: CoroutineContext = EmptyCoroutineContext,
) : super(description, parentCoroutineContext)
/**
* 通过插件内置的 `plugin.yml` 构造插件实例
*
* @since 2.16.0
*/
@JvmOverloads
public constructor(
parentCoroutineContext: CoroutineContext = EmptyCoroutineContext,

View File

@ -18,12 +18,23 @@ import kotlin.coroutines.EmptyCoroutineContext
* Kotlin 插件的父类.
*/
public abstract class KotlinPlugin : JvmPlugin, AbstractJvmPlugin {
/**
* 通过一个指定的 [JvmPluginDescription] 构造插件示例
*
* 当使用 `plugin.yml` 加载插件示例时不能使用此构造器
*/
@JvmOverloads
public constructor(
description: JvmPluginDescription,
parentCoroutineContext: CoroutineContext = EmptyCoroutineContext,
) : super(description, parentCoroutineContext)
/**
* 通过插件内置的 `plugin.yml` 构造插件实例
*
* @since 2.16.0
*/
@JvmOverloads
public constructor(
parentCoroutineContext: CoroutineContext = EmptyCoroutineContext,