public static byte[] dump() throws Exception {
ClassWriter cw = new ClassWriter(0);
FieldVisitor fv;
MethodVisitor mv;
@SuppressWarnings("unused")
AnnotationVisitor av0;
cw.visit(
V1_5,
ACC_PUBLIC + ACC_SUPER,
"java/lang/Object",
null,
null,
new String[] { "net/sf/joafip/store/service/proxy/IProxyCallBack" });
{
fv = cw.visitField(
ACC_PRIVATE + ACC_TRANSIENT,
"proxyCallBack",
"Lnet/sf/joafip/store/service/proxy/IProxyCallBackToImplement;",
null, null);
fv.visitEnd();
}
{
fv = cw.visitField(ACC_PRIVATE + ACC_TRANSIENT,
"setProxyCallBackTrace", "Ljava/lang/Exception;", null,
null);
fv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 1);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC + ACC_NATIVE,
"registerNatives", "()V", null, null);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL + ACC_NATIVE,
"getClass", "()Ljava/lang/Class;",
"()Ljava/lang/Class<*>;", null);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_NATIVE, "hashCode", "()I",
null, null);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC, "equals", "(Ljava/lang/Object;)Z",
null, null);
mv.visitCode();
mv.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 1);
Label l0 = new Label();
mv.visitJumpInsn(IF_ACMPNE, l0);
mv.visitInsn(ICONST_1);
Label l1 = new Label();
mv.visitJumpInsn(GOTO, l1);
mv.visitLabel(l0);
mv.visitFrame(Opcodes.F_NEW, 2, new Object[] { "java/lang/Object",
"java/lang/Object" }, 0, new Object[] {});
mv.visitInsn(ICONST_0);
mv.visitLabel(l1);
mv.visitFrame(Opcodes.F_NEW, 2, new Object[] { "java/lang/Object",
"java/lang/Object" }, 1, new Object[] { Opcodes.INTEGER });
mv.visitInsn(IRETURN);
mv.visitMaxs(2, 2);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PROTECTED + ACC_NATIVE, "clone",
"()Ljava/lang/Object;", null,
new String[] { "java/lang/CloneNotSupportedException" });
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC, "toString", "()Ljava/lang/String;",
null, null);
mv.visitCode();
mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
mv.visitInsn(DUP);
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder",
"<init>", "()V");
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass",
"()Ljava/lang/Class;");
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getName",
"()Ljava/lang/String;");
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder",
"append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;");
mv.visitLdcInsn("@");
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder",
"append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;");
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "hashCode",
"()I");
mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer",
"toHexString", "(I)Ljava/lang/String;");
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder",
"append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;");
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder",
"toString", "()Ljava/lang/String;");
mv.visitInsn(ARETURN);
mv.visitMaxs(2, 1);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL + ACC_NATIVE, "notify",
"()V", null, null);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL + ACC_NATIVE,
"notifyAll", "()V", null, null);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL + ACC_NATIVE, "wait",
"(J)V", null,
new String[] { "java/lang/InterruptedException" });
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "wait", "(JI)V", null,
new String[] { "java/lang/InterruptedException" });
mv.visitCode();
mv.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
mv.visitVarInsn(LLOAD, 1);
mv.visitInsn(LCONST_0);
mv.visitInsn(LCMP);
Label l0 = new Label();
mv.visitJumpInsn(IFGE, l0);
mv.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
mv.visitInsn(DUP);
mv.visitLdcInsn("timeout value is negative");
mv.visitMethodInsn(INVOKESPECIAL,
"java/lang/IllegalArgumentException", "<init>",
"(Ljava/lang/String;)V");
mv.visitInsn(ATHROW);
mv.visitLabel(l0);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] { "java/lang/Object",
Opcodes.LONG, Opcodes.INTEGER }, 0, new Object[] {});
mv.visitVarInsn(ILOAD, 3);
Label l1 = new Label();
mv.visitJumpInsn(IFLT, l1);
mv.visitVarInsn(ILOAD, 3);
mv.visitLdcInsn(new Integer(999999));
Label l2 = new Label();
mv.visitJumpInsn(IF_ICMPLE, l2);
mv.visitLabel(l1);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] { "java/lang/Object",
Opcodes.LONG, Opcodes.INTEGER }, 0, new Object[] {});
mv.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
mv.visitInsn(DUP);
mv.visitLdcInsn("nanosecond timeout value out of range");
mv.visitMethodInsn(INVOKESPECIAL,
"java/lang/IllegalArgumentException", "<init>",
"(Ljava/lang/String;)V");
mv.visitInsn(ATHROW);
mv.visitLabel(l2);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] { "java/lang/Object",
Opcodes.LONG, Opcodes.INTEGER }, 0, new Object[] {});
mv.visitVarInsn(ILOAD, 3);
mv.visitLdcInsn(new Integer(500000));
Label l3 = new Label();
mv.visitJumpInsn(IF_ICMPGE, l3);
mv.visitVarInsn(ILOAD, 3);
Label l4 = new Label();
mv.visitJumpInsn(IFEQ, l4);
mv.visitVarInsn(LLOAD, 1);
mv.visitInsn(LCONST_0);
mv.visitInsn(LCMP);
mv.visitJumpInsn(IFNE, l4);
mv.visitLabel(l3);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] { "java/lang/Object",
Opcodes.LONG, Opcodes.INTEGER }, 0, new Object[] {});
mv.visitVarInsn(LLOAD, 1);
mv.visitInsn(LCONST_1);
mv.visitInsn(LADD);
mv.visitVarInsn(LSTORE, 1);
mv.visitLabel(l4);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] { "java/lang/Object",
Opcodes.LONG, Opcodes.INTEGER }, 0, new Object[] {});
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(LLOAD, 1);
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "wait",
"(J)V");
mv.visitInsn(RETURN);
mv.visitMaxs(4, 4);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "wait", "()V", null,
new String[] { "java/lang/InterruptedException" });
mv.visitCode();
mv.visitVarInsn(ALOAD, 0);
mv.visitInsn(LCONST_0);
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "wait",
"(J)V");
mv.visitInsn(RETURN);
mv.visitMaxs(3, 1);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PROTECTED, "finalize", "()V", null,
new String[] { "java/lang/Throwable" });
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 1);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
mv.visitCode();
mv.visitMethodInsn(INVOKESTATIC, "java/lang/Object",
"registerNatives", "()V");
mv.visitInsn(RETURN);
mv.visitMaxs(0, 0);
mv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PRIVATE, "forceLoad$JOAFIP$",
"(Ljava/lang/Object;)V", null, null);
mv.visitCode();
Label l0 = new Label();
Label l1 = new Label();
Label l2 = new Label();
mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Exception");
mv.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
mv.visitVarInsn(ALOAD, 1);
mv.visitVarInsn(ALOAD, 0);
Label l3 = new Label();
mv.visitJumpInsn(IF_ACMPEQ, l3);
mv.visitLabel(l0);
mv.visitVarInsn(ALOAD, 1);
mv.visitMethodInsn(INVOKESTATIC,
"net/sf/joafip/store/service/proxy/ProxyManager2",
"forceLoad", "(Ljava/lang/Object;)V");
mv.visitLabel(l1);
mv.visitJumpInsn(GOTO, l3);
mv.visitLabel(l2);
mv.visitFrame(Opcodes.F_NEW, 2, new Object[] { "java/lang/Object",
"java/lang/Object" }, 1,
new Object[] { "java/lang/Exception" });
mv.visitVarInsn(ASTORE, 2);
mv.visitTypeInsn(NEW,
"net/sf/joafip/store/service/proxy/JoafipObjectException");
mv.visitInsn(DUP);
mv.visitVarInsn(ALOAD, 2);
mv.visitMethodInsn(INVOKESPECIAL,
"net/sf/joafip/store/service/proxy/JoafipObjectException",
"<init>", "(Ljava/lang/Throwable;)V");
mv.visitInsn(ATHROW);
mv.visitLabel(l3);
mv.visitFrame(Opcodes.F_NEW, 2, new Object[] { "java/lang/Object",
"java/lang/Object" }, 0, new Object[] {});
mv.visitInsn(RETURN);
mv.visitMaxs(3, 3);
mv.visitEnd();
}
cw.visitEnd();
return cw.toByteArray();
}