lundi 11 avril 2016

Getting current class

how can I get the current class in Kotlin. For example if there are the abstract class "Animal" and the child-class "Dog" (witch is a child of "Animal") how can I get the class of "Dog" in "Animal". I don't now witch classes will use "Animal"

I already tried to use:

this::class

(what could be in Java):

this.getClass()

But this method is according to my IDE not available.

Best regards

Jonas Franz





Aucun commentaire:

Enregistrer un commentaire