A
Adam Lipscombe
Folks
How do I correctly parameterise a Class?
I have code like this:
String classPath = "com.blah.bah.MyClass"
Class clazz = Class.forName(classPath);
Facade facade = (Facade) clazz.newInstance();
Facade is an interface and the class named by classPath will always implement this i/f.
Do I simply do: Class<Facade> clazz = Class.forName(classPath);
If not, what?
TIA - Adam
How do I correctly parameterise a Class?
I have code like this:
String classPath = "com.blah.bah.MyClass"
Class clazz = Class.forName(classPath);
Facade facade = (Facade) clazz.newInstance();
Facade is an interface and the class named by classPath will always implement this i/f.
Do I simply do: Class<Facade> clazz = Class.forName(classPath);
If not, what?
TIA - Adam