Horje

Kotlin - Class Delegation
Start
  Delegate a method to another class
interface Foo {
    fun example()
}

class Bar {
    fun example() {
        println("Hello, world!")
    }
}

class Baz(b : Bar) : Foo by b

Baz(Bar()).example()

The example prints Hello, world!


Read Article
https://develop.horje.com/learn/1434/reference