Using jdk proxies and Kotlin kinda sucks since all...
# announcements
s
Using jdk proxies and Kotlin kinda sucks since all checked exceptions are wrapped in
UndeclaredThrowableException
. What are people doing instead ?
e
What are you using proxies for?
s
Variations of logging/monitoring invocation counts, duration and another case with something like:
Copy code
interface LocationFactory<T> {
    fun frontpage() : T
    fun specificPage(user: User) : T
}
We can then implement it for say
Location
class once and have proxies for other types. I can come up with other ways to somewhat do this without proxies but we do this to optimize the readability at the many call sites of these functions.