May 14, 2021
Creating Dynamic Proxies with Kotlin Coroutines
Most experienced developers are familiar with using dynamic proxies. They enable us to implement an interface at runtime and decide how to execute methods dynamically as they are invoked. This is very useful to add additional functionality around existing implementations (especially from third-party libraries) as described by the Decorator Pattern. However, Kotlin coroutines introduce a new set of problems when creating dynamic proxies. We'll explore how to properly detect and dynamically invoke suspend functions declared on an interface. The Setup First, create...
Read Post