mardi 29 décembre 2015

How to use reflect to instant a GENERIC class in JAVA?

I wanna instant a generic class, like SomeContainer<SomeClass>. I just have the className, so, use java reflect, like Class.forNameClass.forName(param).newInstance(); but it doesn't support generic, how can I do ?





Aucun commentaire:

Enregistrer un commentaire