January 2018
Intermediate to advanced
434 pages
14h 1m
English
In this recipe, we will look into the ways by which we can get the class reference in Kotlin. Primarily, we will be working with reflection. Reflection is a library that provides the ability to inspect code at runtime instead of compile time. In Java, we can get a variable's class through getClass(), like something.getClass(). Let’s see how to resolve a variable’s class in Kotlin.
Read now
Unlock full access