If I have a generic class like this:
class SomeClass<T> {
public aFunction(T anArg) {
// some implementation
}
}
Is there then a way to instantiate the SomeClass, using a variable of the Class type?
I basically want to be able to do this:
Class var = String.class; // just an example, obviously
SomeClass<?> anInstance = new SomeClass< var >();
Or is there a workaround?