Rewrite bridge generation to Kotlin, make it abstract