ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
ClassVisitor cv = new StaticInitMerger("$clinit$", cw);
cv.visit(V1_1, ACC_PUBLIC, "A", null, "java/lang/Object", null);
cv.visitField(ACC_PUBLIC + ACC_STATIC, "counter", "I", null, null);
for (int i = 0; i < 5; ++i) {
MethodVisitor mv = cv.visitMethod(ACC_PUBLIC,
"<clinit>",
"()V",
null,
null);
mv.visitFieldInsn(GETSTATIC, "A", "counter", "I");