mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +08:00
Generate with @JvmStatic
This commit is contained in:
parent
7b359108b9
commit
77db778503
@ -17,10 +17,13 @@ object _Setting_value_ktCodegen {
|
|||||||
override val defaultInvokeArgs: List<KtType> = KtPrimitives + KtString
|
override val defaultInvokeArgs: List<KtType> = KtPrimitives + KtString
|
||||||
|
|
||||||
override fun StringBuilder.apply(ktType: KtType) {
|
override fun StringBuilder.apply(ktType: KtType) {
|
||||||
appendKCode(
|
appendLine(
|
||||||
"""
|
kCode(
|
||||||
|
"""
|
||||||
|
@JvmStatic
|
||||||
val ${ktType.standardName}SerializerDescriptor = ${ktType.standardName}.serializer().descriptor
|
val ${ktType.standardName}SerializerDescriptor = ${ktType.standardName}.serializer().descriptor
|
||||||
"""
|
"""
|
||||||
|
).lines().joinToString("\n") { " $it" }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,19 +16,37 @@ import net.mamoe.mirai.console.setting.Setting
|
|||||||
|
|
||||||
|
|
||||||
internal object BuiltInSerializerConstants {
|
internal object BuiltInSerializerConstants {
|
||||||
//// region BuiltInSerializerConstants primitives CODEGEN ////
|
//// region BuiltInSerializerConstants primitives CODEGEN ////
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val ByteSerializerDescriptor = Byte.serializer().descriptor
|
val ByteSerializerDescriptor = Byte.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val ShortSerializerDescriptor = Short.serializer().descriptor
|
val ShortSerializerDescriptor = Short.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val IntSerializerDescriptor = Int.serializer().descriptor
|
val IntSerializerDescriptor = Int.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val LongSerializerDescriptor = Long.serializer().descriptor
|
val LongSerializerDescriptor = Long.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val FloatSerializerDescriptor = Float.serializer().descriptor
|
val FloatSerializerDescriptor = Float.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val DoubleSerializerDescriptor = Double.serializer().descriptor
|
val DoubleSerializerDescriptor = Double.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val CharSerializerDescriptor = Char.serializer().descriptor
|
val CharSerializerDescriptor = Char.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val BooleanSerializerDescriptor = Boolean.serializer().descriptor
|
val BooleanSerializerDescriptor = Boolean.serializer().descriptor
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
val StringSerializerDescriptor = String.serializer().descriptor
|
val StringSerializerDescriptor = String.serializer().descriptor
|
||||||
|
|
||||||
//// endregion BuiltInSerializerConstants primitives CODEGEN ////
|
|
||||||
|
//// endregion BuiltInSerializerConstants primitives CODEGEN ////
|
||||||
}
|
}
|
||||||
|
|
||||||
//// region Setting.value primitives impl CODEGEN ////
|
//// region Setting.value primitives impl CODEGEN ////
|
||||||
|
Loading…
Reference in New Issue
Block a user