July 2018
Intermediate to advanced
242 pages
8h 6m
English
In this recipe, we are going to learn how to modify a Kotlin function's name when it is being compiled to the generated JVM bytecode. We need this feature because of the type-erasure that happens when generating the JVM bytecode. However, thanks to the @JvmName annotation, we can declare a number of different functions, but that has the same name and use their original name in the Kotlin code while keeping their JVM bytecode names distinct to satisfy the compiler.
Read now
Unlock full access