I need to instantiate and object with a generic parameter, representing the generic type of one of the members of an object. Best explained with an example:
Class ExampleClass {
Class someClass;
public void setSomeClass(Class c) {
this.someClass=c;
}
}
new ExampleClass().setSomeClass(Integer.class);
How do I now instantiate an ArrayList for example with the generic type (<Integer>) of ExampleClass.someClass?
Thank you
nat