* @throws GenerationError
*/
public static JavaClass createJavaClass(ClassDef classDef) throws GenerationError {
GenJavaClass gjc = new GenJavaClass(classDef) ;
for(MethodDef md: classDef.methods) {
Method method = gjc.createMethod(classDef.name.toString(),md);
gjc.instructionFactory.getClassGen().addMethod(method) ;
}
for(FieldDef fd: classDef.fields) {
Field f = gjc.createField(fd);
gjc.instructionFactory.getClassGen().addField(f) ;