private Class build(ClassBuilder builder, ClassDefinition classDef) throws Exception {
ProjectClassLoader prjClassLoader = ProjectClassLoader.createProjectClassLoader();
byte[] d = builder.buildClass( classDef, prjClassLoader );
JavaDialectRuntimeData data = new JavaDialectRuntimeData();
data.write( convertClassToResourcePath(classDef.getClassName()), d );
ClassLoader classLoader = new PackageClassLoader(data, prjClassLoader);
ClassFieldAccessorStore store = new ClassFieldAccessorStore();
store.setClassFieldAccessorCache( new ClassFieldAccessorCache( classLoader ) );
store.setEagerWire( true );
Class clazz = classLoader.loadClass( classDef.getClassName() );
classDef.setDefinedClass( clazz );
return clazz;
}