Hola!!


This site is built using hugo and the theme is built by Fredrik if you enjoy it, it is available at github


Java generics to kotlin

Generics code of java was expressed using the reified of kotlin.

# Java
public <T extends BaseCode> T getCode(Class<T> type) {
    return (T) codes.get(type);
}
# Kotlin
inline fun <reified T : BaseCode> Code.system() = getCode(T::class.java)