ClassRoom clazz = context.getClassRoom().createClass(_descriptor, "z_"+_name);
clazz.setAccessFlags(Code.ACC_PUBLIC);
ConstantPool pool = clazz.getPool();
context.pushClass(clazz);
Field typefield1 = clazz.createField("_class", "Lanvil/script/compiler/CompiledClassType;", Code.ACC_PUBLIC|Code.ACC_STATIC);
Field typefield2 = clazz.createField("_type", "Lanvil/core/Any;", Code.ACC_PUBLIC|Code.ACC_STATIC);
ClassType base = getBaseClass();
if (base != Any.__class__) {
clazz.setSuperClassname(base.getDescriptor());
} else {
clazz.setSuperClassname("anvil/core/AnyClass");
}
clazz.setAccessFlags(Code.ACC_SUPER|Code.ACC_PUBLIC);
Field bases = clazz.createField("_bases", "[Ljava/lang/String;", Code.ACC_PUBLIC|Code.ACC_STATIC);
Code code = clazz.getStatic().getCode();
context.pushCode(code);
code.getstatic(pool.addFieldRef(_parent.getDescriptor(), "_members", "[Ljava/lang/Object;"));
code.pop();