Only at run-time am I passed the fully qualified Class name (ie "com.firm.me.MyClass")
I need to instantiate a Generic class defined as, say :
Class A <T>
{
}
Where "T" is the type associated with the passed in fully qualified class name.
I have the following :
Class <?> clazz = Class.forName ("com.firm.me.MyClass");
I want (logically speaking) to have something like ..
A <clazz> myInstance = new A <clazz>;
The use of "clazz" in the positions above gives rise to following errors :
"clazz cannot be resolved to a type".
How can I do what I want (logically) to do.
Many thanks.