mv.visitFieldInsn(Opcodes.PUTFIELD, className.replace('.', '/'), fieldName, type.toString());
} else {
mv.visitFieldInsn(Opcodes.GETFIELD, className.replace('.', '/'), fieldName, type.toString());
mv.visitVarInsn(Opcodes.ALOAD, 1);
final Label jmpLabel = new Label();
mv.visitJumpInsn(Opcodes.IF_ACMPNE, jmpLabel);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitInsn(Opcodes.ACONST_NULL);
mv.visitFieldInsn(Opcodes.PUTFIELD, className.replace('.', '/'), fieldName, type.toString());
mv.visitLabel(jmpLabel);
}