mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +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 fun StringBuilder.apply(ktType: KtType) {
|
||||
appendKCode(
|
||||
"""
|
||||
appendLine(
|
||||
kCode(
|
||||
"""
|
||||
@JvmStatic
|
||||
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 {
|
||||
//// region BuiltInSerializerConstants primitives CODEGEN ////
|
||||
//// region BuiltInSerializerConstants primitives CODEGEN ////
|
||||
|
||||
@JvmStatic
|
||||
val ByteSerializerDescriptor = Byte.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val ShortSerializerDescriptor = Short.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val IntSerializerDescriptor = Int.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val LongSerializerDescriptor = Long.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val FloatSerializerDescriptor = Float.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val DoubleSerializerDescriptor = Double.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val CharSerializerDescriptor = Char.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val BooleanSerializerDescriptor = Boolean.serializer().descriptor
|
||||
|
||||
@JvmStatic
|
||||
val StringSerializerDescriptor = String.serializer().descriptor
|
||||
|
||||
//// endregion BuiltInSerializerConstants primitives CODEGEN ////
|
||||
|
||||
//// endregion BuiltInSerializerConstants primitives CODEGEN ////
|
||||
}
|
||||
|
||||
//// region Setting.value primitives impl CODEGEN ////
|
||||
|
Loading…
Reference in New Issue
Block a user