``` public inline fun <reified T: Any> fullT...
# reflect
a
Copy code
public inline fun <reified T: Any> fullType(): TypeReference<T> = object:TypeReference<T>(){}

public abstract class TypeReference<T> protected constructor() {
    public val type: Type by lazy {
        javaClass.getGenericSuperclass() let { superClass ->
            if (superClass is Class<*>) {
                throw IllegalArgumentException("Internal error: TypeReference constructed without actual type information")
            }
            (superClass as ParameterizedType).getActualTypeArguments()[0]
        }
    }
}