mercredi 25 mars 2020

How to create instance of object using reflection for class that have parameter in constructor?

I'm trying to create object using reflection with class that have parameter in constructor.

This is what I try for class without constructor.

ABC::class.createInstance()

But I have no idea how to do this for class with constructor like

class ABC(a: Int, b: Int) {}




Aucun commentaire:

Enregistrer un commentaire