top of page

Behind the mirror, Kotlin Reflection

What you know about reflection is shaped by our experiences in the world of Java. At least we might have used Class.forName or called newInstance().
In our Kotlin world, this might not be enough though. If we want to explore Kotlin’s specific features you can not use the JVM function. Maybe you want to enumerate sealed classes or get the one and only instance of a Kotlin object.
And how do they work? Are they based on the JVM variants and if not what about their performance?
Let’s walk behind the mirror and use and understand the reflection package of Kotlin.

bottom of page