this code doesn\'t compile. I\'m wondering what I am doing wrong:
private static Importable getRightInstance(String s) throws Exception { Class
Use a runtime conversion:
Class extends Importable> c = Class.forName (s).asSubclass (Importable.class);
This will bark with an exception at runtime if s specifies a class that doesn't implement the interface.
s