mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-13 14:50:43 +08:00
Remove all @JvmDefault
since -Xjvm-default=all
mode
This commit is contained in:
parent
b52ba9dc2c
commit
b2d06aba14
@ -43,6 +43,5 @@ public interface MiraiConsoleFrontEndDescription {
|
|||||||
/**
|
/**
|
||||||
* 返回显示在 [MiraiConsole] 启动时的信息
|
* 返回显示在 [MiraiConsole] 启动时的信息
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun render(): String = "Frontend ${name}: version ${version}, provided by $vendor"
|
public fun render(): String = "Frontend ${name}: version ${version}, provided by $vendor"
|
||||||
}
|
}
|
@ -108,12 +108,10 @@ public interface MiraiConsoleImplementation : CoroutineScope {
|
|||||||
|
|
||||||
|
|
||||||
@JvmSynthetic
|
@JvmSynthetic
|
||||||
@JvmDefault
|
|
||||||
public override suspend fun sendMessage(message: Message): Unit =
|
public override suspend fun sendMessage(message: Message): Unit =
|
||||||
withContext(Dispatchers.IO) { sendMessageJ(message) }
|
withContext(Dispatchers.IO) { sendMessageJ(message) }
|
||||||
|
|
||||||
@JvmSynthetic
|
@JvmSynthetic
|
||||||
@JvmDefault
|
|
||||||
public override suspend fun sendMessage(message: String): Unit =
|
public override suspend fun sendMessage(message: String): Unit =
|
||||||
withContext(Dispatchers.IO) { sendMessageJ(message) }
|
withContext(Dispatchers.IO) { sendMessageJ(message) }
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,6 @@ public interface CommandSender : CoroutineScope, Permittee {
|
|||||||
*
|
*
|
||||||
* 对于 [MemberCommandSender], 这个函数总是发送给所在群
|
* 对于 [MemberCommandSender], 这个函数总是发送给所在群
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
@JvmBlockingBridge
|
@JvmBlockingBridge
|
||||||
public suspend fun sendMessage(message: String): MessageReceipt<Contact>?
|
public suspend fun sendMessage(message: String): MessageReceipt<Contact>?
|
||||||
|
|
||||||
|
@ -77,7 +77,6 @@ public interface CommandArgumentParser<out T : Any> {
|
|||||||
* @see CommandArgumentParserException
|
* @see CommandArgumentParserException
|
||||||
*/
|
*/
|
||||||
@Throws(CommandArgumentParserException::class)
|
@Throws(CommandArgumentParserException::class)
|
||||||
@JvmDefault
|
|
||||||
public fun parse(raw: MessageContent, sender: CommandSender): T = parse(raw.content, sender)
|
public fun parse(raw: MessageContent, sender: CommandSender): T = parse(raw.content, sender)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ public interface PluginDataHolder {
|
|||||||
* @see Companion.newPluginDataInstance
|
* @see Companion.newPluginDataInstance
|
||||||
* @see KClass.createType
|
* @see KClass.createType
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun <T : PluginData> newPluginDataInstance(type: KType): T =
|
public fun <T : PluginData> newPluginDataInstance(type: KType): T =
|
||||||
newPluginDataInstanceUsingReflection<PluginData>(type) as T
|
newPluginDataInstanceUsingReflection<PluginData>(type) as T
|
||||||
|
|
||||||
@ -64,7 +63,6 @@ public interface AutoSavePluginDataHolder : PluginDataHolder, CoroutineScope {
|
|||||||
/**
|
/**
|
||||||
* 仅支持确切的 [PluginData] 类型
|
* 仅支持确切的 [PluginData] 类型
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public override fun <T : PluginData> newPluginDataInstance(type: KType): T {
|
public override fun <T : PluginData> newPluginDataInstance(type: KType): T {
|
||||||
val classifier = type.classifier?.cast<KClass<PluginData>>()
|
val classifier = type.classifier?.cast<KClass<PluginData>>()
|
||||||
require(classifier != null && classifier.java == PluginData::class.java) {
|
require(classifier != null && classifier.java == PluginData::class.java) {
|
||||||
|
@ -41,28 +41,24 @@ public interface PluginFileExtensions {
|
|||||||
* 从数据目录获取一个文件.
|
* 从数据目录获取一个文件.
|
||||||
* @see dataFolderPath
|
* @see dataFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveDataFile(relativePath: String): File = dataFolderPath.resolve(relativePath).toFile()
|
public fun resolveDataFile(relativePath: String): File = dataFolderPath.resolve(relativePath).toFile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从数据目录获取一个文件.
|
* 从数据目录获取一个文件.
|
||||||
* @see dataFolderPath
|
* @see dataFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveDataPath(relativePath: String): Path = dataFolderPath.resolve(relativePath)
|
public fun resolveDataPath(relativePath: String): Path = dataFolderPath.resolve(relativePath)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从数据目录获取一个文件.
|
* 从数据目录获取一个文件.
|
||||||
* @see dataFolderPath
|
* @see dataFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveDataFile(relativePath: Path): File = dataFolderPath.resolve(relativePath).toFile()
|
public fun resolveDataFile(relativePath: Path): File = dataFolderPath.resolve(relativePath).toFile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从数据目录获取一个文件路径.
|
* 从数据目录获取一个文件路径.
|
||||||
* @see dataFolderPath
|
* @see dataFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveDataPath(relativePath: Path): Path = dataFolderPath.resolve(relativePath)
|
public fun resolveDataPath(relativePath: Path): Path = dataFolderPath.resolve(relativePath)
|
||||||
|
|
||||||
|
|
||||||
@ -83,27 +79,23 @@ public interface PluginFileExtensions {
|
|||||||
* 从配置目录获取一个文件.
|
* 从配置目录获取一个文件.
|
||||||
* @see configFolderPath
|
* @see configFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveConfigFile(relativePath: String): File = configFolderPath.resolve(relativePath).toFile()
|
public fun resolveConfigFile(relativePath: String): File = configFolderPath.resolve(relativePath).toFile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从配置目录获取一个文件.
|
* 从配置目录获取一个文件.
|
||||||
* @see configFolderPath
|
* @see configFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveConfigPath(relativePath: String): Path = configFolderPath.resolve(relativePath)
|
public fun resolveConfigPath(relativePath: String): Path = configFolderPath.resolve(relativePath)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从配置目录获取一个文件.
|
* 从配置目录获取一个文件.
|
||||||
* @see configFolderPath
|
* @see configFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveConfigFile(relativePath: Path): File = configFolderPath.resolve(relativePath).toFile()
|
public fun resolveConfigFile(relativePath: Path): File = configFolderPath.resolve(relativePath).toFile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从配置目录获取一个文件路径.
|
* 从配置目录获取一个文件路径.
|
||||||
* @see configFolderPath
|
* @see configFolderPath
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun resolveConfigPath(relativePath: Path): Path = configFolderPath.resolve(relativePath)
|
public fun resolveConfigPath(relativePath: Path): Path = configFolderPath.resolve(relativePath)
|
||||||
}
|
}
|
@ -37,7 +37,6 @@ public interface ResourceContainer {
|
|||||||
*
|
*
|
||||||
* @return 资源文件内容. 在未找到文件时返回 `null`.
|
* @return 资源文件内容. 在未找到文件时返回 `null`.
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun getResource(path: String): String? = getResource(path, Charsets.UTF_8)
|
public fun getResource(path: String): String? = getResource(path, Charsets.UTF_8)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +44,6 @@ public interface ResourceContainer {
|
|||||||
*
|
*
|
||||||
* @return 资源文件内容. 在未找到文件时返回 `null`.
|
* @return 资源文件内容. 在未找到文件时返回 `null`.
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
public fun getResource(path: String, charset: Charset): String? =
|
public fun getResource(path: String, charset: Charset): String? =
|
||||||
this.getResourceAsStream(path)?.use(InputStream::readBytes)?.let(::String)
|
this.getResourceAsStream(path)?.use(InputStream::readBytes)?.let(::String)
|
||||||
|
|
||||||
|
@ -116,7 +116,6 @@ public interface MessageScope {
|
|||||||
/**
|
/**
|
||||||
* 立刻以此发送消息给所有在此 [MessageScope] 下的消息对象
|
* 立刻以此发送消息给所有在此 [MessageScope] 下的消息对象
|
||||||
*/
|
*/
|
||||||
@JvmDefault
|
|
||||||
@JvmBlockingBridge
|
@JvmBlockingBridge
|
||||||
public suspend fun sendMessage(message: String)
|
public suspend fun sendMessage(message: String)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user