Fix return types

This commit is contained in:
Him188 2020-03-01 20:26:58 +08:00
parent b7fa7adf99
commit e479da9898
2 changed files with 38 additions and 38 deletions

View File

@ -58,13 +58,13 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(EventCancelledException::class, IllegalStateException::class) @Throws(EventCancelledException::class, IllegalStateException::class)
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: Message) { open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<Contact> {
runBlocking { sendMessage(message) } return runBlocking { sendMessage(message) }
} }
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: String) { open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<Contact> {
runBlocking { sendMessage(message) } return runBlocking { sendMessage(message) }
} }
/** /**
@ -78,8 +78,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: ExternalImage) { open fun __uploadImageBlockingForJava__(image: ExternalImage): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -88,8 +88,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: URL) { open fun __uploadImageBlockingForJava__(image: URL): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -98,8 +98,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: InputStream) { open fun __uploadImageBlockingForJava__(image: InputStream): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -108,8 +108,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: Input) { open fun __uploadImageBlockingForJava__(image: Input): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -118,8 +118,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: File) { open fun __uploadImageBlockingForJava__(image: File): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -128,8 +128,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: Bitmap) { open fun __uploadImageBlockingForJava__(image: Bitmap): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -236,8 +236,8 @@ actual abstract class MemberJavaHappyAPI : QQ() {
* @throws PermissionDeniedException 无权限修改时 * @throws PermissionDeniedException 无权限修改时
*/ */
@JvmName("mute") @JvmName("mute")
open fun __muteBlockingForJava__(durationSeconds: Int) { open fun __muteBlockingForJava__(seconds: Int) {
runBlocking { mute(durationSeconds) } return runBlocking { mute(seconds) }
} }
/** /**
@ -250,7 +250,7 @@ actual abstract class MemberJavaHappyAPI : QQ() {
*/ */
@JvmName("unmute") @JvmName("unmute")
open fun __unmuteBlockingForJava__() { open fun __unmuteBlockingForJava__() {
runBlocking { unmute() } return runBlocking { unmute() }
} }
/** /**
@ -263,7 +263,7 @@ actual abstract class MemberJavaHappyAPI : QQ() {
*/ */
@JvmName("kick") @JvmName("kick")
open fun __kickBlockingForJava__(message: String) { open fun __kickBlockingForJava__(message: String) {
runBlocking { kick() } return runBlocking { kick() }
} }
/** /**
@ -297,8 +297,8 @@ actual abstract class MemberJavaHappyAPI : QQ() {
* @throws PermissionDeniedException 无权限修改时 * @throws PermissionDeniedException 无权限修改时
*/ */
@JvmName("muteAsync") @JvmName("muteAsync")
open fun __muteAsyncForJava__(durationSeconds: Int): Future<Unit> { open fun __muteAsyncForJava__(seconds: Int): Future<Unit> {
return future { mute(durationSeconds) } return future { mute(seconds) }
} }
/** /**

View File

@ -58,13 +58,13 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(EventCancelledException::class, IllegalStateException::class) @Throws(EventCancelledException::class, IllegalStateException::class)
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: Message) { open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<Contact> {
runBlocking { sendMessage(message) } return runBlocking { sendMessage(message) }
} }
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: String) { open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<Contact> {
runBlocking { sendMessage(message) } return runBlocking { sendMessage(message) }
} }
/** /**
@ -78,8 +78,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: ExternalImage) { open fun __uploadImageBlockingForJava__(image: ExternalImage): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -88,8 +88,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: URL) { open fun __uploadImageBlockingForJava__(image: URL): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -98,8 +98,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: InputStream) { open fun __uploadImageBlockingForJava__(image: InputStream): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -108,8 +108,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: Input) { open fun __uploadImageBlockingForJava__(image: Input): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -118,8 +118,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: File) { open fun __uploadImageBlockingForJava__(image: File): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**
@ -128,8 +128,8 @@ actual abstract class ContactJavaHappyAPI {
*/ */
@Throws(OverFileSizeMaxException::class) @Throws(OverFileSizeMaxException::class)
@JvmName("uploadImage") @JvmName("uploadImage")
open fun __uploadImageBlockingForJava__(image: BufferedImage) { open fun __uploadImageBlockingForJava__(image: BufferedImage): Image {
runBlocking { uploadImage(image) } return runBlocking { uploadImage(image) }
} }
/** /**