I have a generic class, let's call it Foo, type T and value of T in a string form. Now I want to create an instance of Foo<T>
with this value.
The way I do it with non-generic classes:
Class<?> cls = Class.forName(fooStr);
But how to provide a template parameter to it?
Aucun commentaire:
Enregistrer un commentaire