Commit 9b1f17b0 authored by Him188's avatar Him188

Specify JvmNames

parent dc7d73f1
......@@ -19,8 +19,10 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
/**
* QQ for Android
*/
@Suppress("INAPPLICABLE_JVM_NAME")
actual object QQAndroid : BotFactory {
@UseExperimental(MiraiInternalAPI::class)
@JvmName("newBot")
actual override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
return QQAndroidBot(context, BotAccount(qq, password), configuration)
}
......@@ -29,6 +31,7 @@ actual object QQAndroid : BotFactory {
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@UseExperimental(MiraiInternalAPI::class)
@JvmName("newBot")
actual override fun Bot(
context: Context,
qq: Long,
......
......@@ -14,20 +14,24 @@ import net.mamoe.mirai.BotFactory
import net.mamoe.mirai.qqandroid.QQAndroid.Bot
import net.mamoe.mirai.utils.BotConfiguration
import net.mamoe.mirai.utils.Context
import kotlin.jvm.JvmName
/**
* QQ for Android
*/
@Suppress("INAPPLICABLE_JVM_NAME")
expect object QQAndroid : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
override fun Bot(
context: Context,
qq: Long,
......
......@@ -22,12 +22,14 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
/**
* QQ for Android
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@UseExperimental(MiraiInternalAPI::class)
actual object QQAndroid : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
actual override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
return QQAndroidBot(context, BotAccount(qq, password), configuration)
}
......@@ -35,12 +37,14 @@ actual object QQAndroid : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
fun Bot(qq: Long, password: String, configuration: BotConfiguration = BotConfiguration.Default): Bot =
QQAndroidBot(BotAccount(qq, password), configuration)
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
actual override fun Bot(
context: Context,
qq: Long,
......@@ -51,6 +55,7 @@ actual object QQAndroid : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
fun Bot(
qq: Long,
passwordMd5: ByteArray,
......
......@@ -13,6 +13,7 @@ package net.mamoe.mirai
import net.mamoe.mirai.utils.BotConfiguration
import net.mamoe.mirai.utils.Context
import kotlin.jvm.JvmName
/**
* 构造 [Bot] 的工厂.
......@@ -21,10 +22,12 @@ import net.mamoe.mirai.utils.Context
* - `mirai-core-timpc`: `TIMPC`
* - `mirai-core-qqandroid`: `QQAndroid`
*/
@Suppress("INAPPLICABLE_JVM_NAME")
interface BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
fun Bot(
context: Context,
qq: Long,
......@@ -35,6 +38,7 @@ interface BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
*/
@JvmName("newBot")
fun Bot(
context: Context,
qq: Long,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment