Using reflection I can iterate through my attributes:
data class AnotherDataClass(
val property: String,
val dataClass: DataClass
)
AnotherDataClass::class.memberProperties.filter {
return it::class.isData
}
But it::class.isData
is always false since the type of it
is jvm.internal.KProperty1Impl
. Is there a way to check if this class is a data class?
Aucun commentaire:
Enregistrer un commentaire