I realise now that I haven't fully presented the p...
# announcements
j
I realise now that I haven't fully presented the problem. (Early morning......) I'm essentially providing default factory methods which are then overridden by specific factory objects to account for quirks in individual midi pedal models. i.e.:
Copy code
class Example {java-style-protected} constructor (data: ByteArray) : MidiMessage(data) {
}

abstract class ExampleFactory(private val deviceId: byte) {
    open fun factoryMethod1(): Example = ...
    open fun factoryMethod2(on: Boolean): Example = ...
    ...
}

object SpecificExampleFactory: ExampleFactory(0x65) {
    override fun factoryMethod7( ...
    fun factoryMethod9 ...
}
I don't think the companion object works here; it would be the obvious solution otherwise