Tag: 样板

Kotlin – 次要构造函数,由一个参数不同

我有一段Kotlin代码,其中第一个和第二个构造函数细微不同,请参见下文 class InstructionPrototype constructor( val iname: String, val opcode: Int, val mnemonicExample: String, val numericExample: Int, val description: String, val format: Format, val pattern: Pattern, var type: Type? = null, var rt: Int? = null, var funct: Int? = null, var conditions: Array<(n: Int) -> String?>? = null) { constructor( iname: String, opcode: Int, mnemonicExample: […]