sclass LASClassDef { settable S userGivenName; new L fields; settable S classDefPrefix = "userCode."; sclass FieldDef { settable S name; settable Class type; } S structForHash() { ret struct(litorderedmap(+userGivenName, +fields)); } simplyCached S classHash() { ret md5(structForHash()); } S finalClassName() { ret classDefPrefix() + or2(userGivenName, "C") + "_" + classHash(); } simplyCached byte[] toBytes() { ClassMaker classMaker = new(finalClassName()); for (field : fields) { FieldGen fg = new(Const.ACC_PUBLIC, classToBCELType(field.type), field.name, classMaker.getConstantPool()); classMaker.addField(fg); } ret classMaker.toBytes(); } }