I want to instantiate a class by the value of a String. I found several tutorials that show several methods for doing this. The class MUST inherit from a certain interface
Here's how I would do it:
ImplementMe noCastNeeded = this.getClassLoader() .loadClass("my.package.IImplementedYou") .asSubclass(ImplementMe.class).newInstance();
There are some Exceptions to catch but that's ok I think. :)