final ClassFile file = new ClassFile(NAME, SerializationHackProxy.class.getName());
final ClassMethod method = file.addMethod(Modifier.PUBLIC, "read", "Ljava/lang/Object;", "Ljava/io/ObjectInputStream;");
final CodeAttribute codeAttribute = method.getCodeAttribute();
codeAttribute.aload(1);
codeAttribute.invokevirtual("java/io/ObjectInputStream", "readObject", "()Ljava/lang/Object;");
codeAttribute.returnInstruction();
ClassMethod ctor = file.addMethod(Modifier.PUBLIC, "<init>", "V");
ctor.getCodeAttribute().aload(0);
ctor.getCodeAttribute().invokespecial(SerializationHackProxy.class.getName(), "<init>", "()V");