With reference to the following link, I have created the classes at run time, http://blog.javaforge.net/post/31913732423/howto-create-java-pojo-at-runtime-with-javassist.I have used cc.writeFile("//path") right before or right after you call cc.toClass() class has been stored at the location specified.
but throwing an error as below unable to continue after cc.writeFile().
Exception in thread "main" java.lang.RuntimeException: toBytecode(): EmployeeEntity was pruned.