Studyon Minte9.com
Java SE




Class Dinamicaly




package testexample; public class Test { public static void main(String[] args) throws Exception { String str = "testexample.myClass"; Class cls = Class.forName(str); cls.newInstance(); // Outputs: myClass instantiated } } class myClass { public myClass() { System.out.println("myClass instantiated"); } }
 


http://stackoverflow.com/questions/10548389/java-assist-creating-dynamic-class-and-its-object