Is there a “kotlin way” to handle delegation to a ...
# announcements
e
Is there a “kotlin way” to handle delegation to a class (as opposed to an interface). E.g. I have a class
Base
which doesn’t implement anything, and I want to create class
Derived
which extends
Base
and delegates to an instance of
Base
. I know I can use regular java dynamic proxies; wondering if there’s a “kotlin” way.
d
eric239: I guess the Kotlin way would be to extract the interface from
Base
that you want
Derived
to use, then delegate to the interface. There’s no way delegate to a class built in to the language.
e
okay, makes sense