final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT);
writeReplace.addCheckedExceptions(exceptions);
CodeAttribute b = writeReplace.getCodeAttribute();
b.newInstruction(SerializableClientProxy.class.getName());
b.dup();
b.aload(0);
b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class);
b.ldc(getContextId());
b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + DescriptorUtils.VOID_CLASS_DESCRIPTOR);
b.returnInstruction();