如何从Kproperty获取KClass?

时间:2018-11-06 11:08:05

标签: java kotlin

fun testClass(claz: KProperty<*>) {
    print(claz::class)
}

fun main(args: Array<String>) {
    testClass(DfBankCard::accountType)
}

我不知道Kproperty来自哪里 我想获取属性的Holder类而不是属性的类型,在这种情况下,我想要的结果是DfBankCard.class

0 个答案:

没有答案
相关问题