Fix deprecation message on PluginData implementations

This commit is contained in:
Him188 2020-09-20 21:35:31 +08:00
parent 91c5f5f134
commit 13a0444244
4 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ import kotlinx.coroutines.Job
* @see AutoSavePluginData * @see AutoSavePluginData
*/ */
public open class AutoSavePluginConfig : AutoSavePluginData, PluginConfig { public open class AutoSavePluginConfig : AutoSavePluginData, PluginConfig {
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存名称\")")) @Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"把我改成保存名称\")"))
@Suppress("DEPRECATION_ERROR") @Suppress("DEPRECATION_ERROR")
public constructor() : super() public constructor() : super()

View File

@ -30,7 +30,7 @@ import kotlin.reflect.full.findAnnotation
* @see PluginData * @see PluginData
*/ */
public open class AutoSavePluginData private constructor( public open class AutoSavePluginData private constructor(
@Suppress("UNUSED_PARAMETER") primaryConstructorMark: Any? @Suppress("UNUSED_PARAMETER") primaryConstructorMark: Any?,
) : AbstractPluginData() { ) : AbstractPluginData() {
private lateinit var owner_: AutoSavePluginDataHolder private lateinit var owner_: AutoSavePluginDataHolder
private val autoSaveIntervalMillis_: LongRange get() = owner_.autoSaveIntervalMillis private val autoSaveIntervalMillis_: LongRange get() = owner_.autoSaveIntervalMillis
@ -45,7 +45,7 @@ public open class AutoSavePluginData private constructor(
_saveName = saveName _saveName = saveName
} }
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig")) @Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginData(\"把我改成保存名称\")"))
public constructor() : this(null) { public constructor() : this(null) {
val clazz = this::class val clazz = this::class
_saveName = clazz.findAnnotation<ValueName>()?.value _saveName = clazz.findAnnotation<ValueName>()?.value

View File

@ -38,7 +38,7 @@ import net.mamoe.mirai.console.data.PluginData
* @see PluginConfig * @see PluginConfig
*/ */
public abstract class JAutoSavePluginConfig : AutoSavePluginConfig, PluginConfig { public abstract class JAutoSavePluginConfig : AutoSavePluginConfig, PluginConfig {
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存名称\")")) @Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("JAutoSavePluginConfig(\"把我改成保存名称\")"))
@Suppress("DEPRECATION_ERROR") @Suppress("DEPRECATION_ERROR")
public constructor() : super() public constructor() : super()

View File

@ -67,7 +67,7 @@ import kotlin.reflect.full.createType
* @see PluginData * @see PluginData
*/ */
public abstract class JAutoSavePluginData : AutoSavePluginData, PluginConfig { public abstract class JAutoSavePluginData : AutoSavePluginData, PluginConfig {
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存的名称\")")) @Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("JAutoSavePluginData(\"把我改成保存名称\")"))
@Suppress("DEPRECATION_ERROR") @Suppress("DEPRECATION_ERROR")
public constructor() : super() public constructor() : super()