c.setSuper("java.lang.Object");
c.setModifiers(Access.PUBLIC);
c.setSourceFile("HelloWorld.java");
Method m = c.addMethod("<init>", "()V", Access.PUBLIC);
CodeAttr code = m.startCode();
code.pushScope();
code.emitPushThis();
code.emitInvokeSpecial(objectCtor);
code.emitReturn();
code.popScope();
m = c.addMethod("main", "([Ljava/lang/String;)V", Access.PUBLIC
| Access.STATIC);
code = m.startCode();
code.pushScope();
code.emitGetStatic(outField);
code.emitPushString("Hello world!");
code.emitInvokeVirtual(printlnMethod);
code.emitReturn();
code.popScope();
return c.writeToArray();
}