Java Generics & Reflection
问题 this probably is a basic question, but can I do something like this: Class myClass = Class.forName("Integer"); SomethingSimple<myClass> obj; Where SomethingSimple is a very simple generic class: class SomethingSimple<T> { T value; SomethingSimple() {} public void setT(T val) { value = val; } public T getT() { return value; } } Obviously, the code above is not correct, since myClass is an object of type Class, and a class is required. The question is how can this be achieved. I read the other