mardi 8 novembre 2016

how to use Class as type parameter

I need to get the needed class type from code. People could specify name of a class "com.test.SomeEntity". Then in my code, I am getting the class:

Class myClass = Class.forName(className)

I need to generate a list of this myClass type. How can I actually make List<myClass> work?

Thanks!





Aucun commentaire:

Enregistrer un commentaire