https://kotlinlang.org logo
#android
Title
# android
u

ubu

09/10/2018, 10:35 AM
@maxmello, I mean instead of this:
Copy code
class App : Application {
    private val someObject : SomeObject

    fun someMethod() {
        someObject.someMethod()
    }
}
have something like this:
Copy code
interface SomeBehavior {
    fun someMethod()
}

class App : Application, SomeBehavior by someObject {
    private val someObject : SomeObject
}

class SomeObject : SomeBehavior {
    fun someMethod() {
        // TODO implement some method
    }
}