private static void writeSetPrimitiveBeanPropertyFromArray(final Class cl,
                                                             final CodeVisitor mw,
                                                             final Method setter,
                                                             final Class returnType,
                                                             final int beanIdx,
                                                             final int valueArrayIdx,
                                                             final int colPos)
  {
    mw.visitVarInsn(ALOAD, beanIdx);
    mw.visitVarInsn(ALOAD, valueArrayIdx);
    mw.visitIntInsn(SIPUSH, colPos);
    mw.visitInsn(AALOAD);
    if (returnType == boolean.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Boolean.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Boolean.class),
                         "booleanValue",
                         Type.getMethodDescriptor(Type.BOOLEAN_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == char.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Character.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Character.class),
                         "charValue",
                         Type.getMethodDescriptor(Type.CHAR_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == byte.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Byte.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Byte.class),
                         "byteValue",
                         Type.getMethodDescriptor(Type.BYTE_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == short.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Short.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Short.class),
                         "shortValue",
                         Type.getMethodDescriptor(Type.SHORT_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == int.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Integer.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Integer.class),
                         "intValue",
                         Type.getMethodDescriptor(Type.INT_TYPE, new Type[]{}));
    }
    else if (returnType == long.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Long.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Long.class),
                         "longValue",
                         Type.getMethodDescriptor(Type.LONG_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == float.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Float.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Float.class),
                         "floatValue",
                         Type.getMethodDescriptor(Type.FLOAT_TYPE,
                                                  new Type[]{})
      );
    }
    else if (returnType == double.class) {
      mw.visitTypeInsn(CHECKCAST, Type.getInternalName(Double.class));
      mw.visitMethodInsn(INVOKEVIRTUAL,
                         Type.getInternalName(Double.class),
                         "doubleValue",
                         Type.getMethodDescriptor(Type.DOUBLE_TYPE,
                                                  new Type[]{})
      );
    }
    mw.visitMethodInsn(INVOKEVIRTUAL,
                       Type.getInternalName(cl),
                       setter.getName(),
                       Type.getMethodDescriptor(setter));
  }