jcodemodel makes it possible to add private attributes by doing something like:
JFieldVar quantity = jc.field(JMod.PRIVATE, Integer.class, "myAtt");
However, what happens instead of using a class from the JDK you are using a class that won't be on the classpath at the time you invoke field API?
All you know is the class name as a String, you don't have that class on your classpath - someone else is generating it.