``` data class Last(val symbol: String, ...
# announcements
o
Copy code
data class Last(val symbol: String,
                val price: Double,
                val size: Int,
                val time: Long) {
    public fun getAdapter(): JsonAdapter<out Last> {
        return GlobalMoshi.moshi.adapter(this::class.java)
    }
}
if i want a
getAdapter
function on every type i'd make an extension function right?
Copy code
inline fun <reified T> T.moshiAdapter(): JsonAdapter<T> {
    return GlobalMoshi.moshi.adapter(T::class.java)
}
but this isn't available on classes What am i doing wrong here ?