lundi 22 janvier 2018

is it possible to get generic class by given parameter?

Assume i have "java.util.List<java.lang.String>" as a parameter in String. I want to get it as Class or Type, something like that:

ClassLoader cl=Thread.currentThread().getContextClassLoader();
Class clazz=cl.loadClass("java.util.List<java.lang.String>");

Is it possible somehow?





Aucun commentaire:

Enregistrer un commentaire