lundi 22 janvier 2018

Check type of member/property

Let's say i have any class, like this one:

class SomeClass(val aThing: String, val otherThing: Double)

Then I use reflection to analyze the fields of this class:

 for(field in SomeClass.declaredMemberProperties){

    }

How can I check the type of each field?





Aucun commentaire:

Enregistrer un commentaire