mardi 20 septembre 2016

Kotlin - Getting all variablenames of Class

Is there a Kotlin reflect method that will do the same as Java's getDeclaredFields()?

I know there is an option for MyClass::class.members but there is no documentation about this call available.

How can I get a list of a Kotlin data class her declaredFields? And if this is possible is it also possible to filter for public and private fields? (Like Java's Modifier.isPrivate(field.getModifiers()))





Aucun commentaire:

Enregistrer un commentaire