docs: private static int createParameterArray(GeneratorAdapter mg,
                                              Type[] argTypes)
      {
          // -----------------------------------------------------------------------
          //     Object[] args = new Object[# of args];
          // -----------------------------------------------------------------------
          int args = mg.newLocal(TYPE_Object_ARRAY);
          mg.push(argTypes.length);
          mg.visitTypeInsn(ANEWARRAY, "java/lang/Object");
          mg.storeLocal(args);
  
          // -----------------------------------------------------------------------
          //     args[i] = "parameter";  ->  for each parameter
          // -----------------------------------------------------------------------
          for (int i = 0; i < argTypes.length; i++)
          {
              mg.loadLocal(args);
              mg.push(i);
  
              // Convert primities to objects to put in 'args' array.
              switch (argTypes[i].getSort())
              {
                  case Type.BOOLEAN:
                      mg.visitTypeInsn(NEW, "java/lang/Boolean");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Boolean", "<init>", "(Z)V");
                      break;
  
                  case Type.CHAR:
                      mg.visitTypeInsn(NEW, "java/lang/Character");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Character", "<init>", "(C)V");
                      break;
  
                  case Type.BYTE:
                      mg.visitTypeInsn(NEW, "java/lang/Byte");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Byte", "<init>", "(B)V");
                      break;
  
                  case Type.SHORT:
                      mg.visitTypeInsn(NEW, "java/lang/Short");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Short", "<init>", "(S)V");
                      break;
  
                  case Type.INT:
                      mg.visitTypeInsn(NEW, "java/lang/Integer");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Integer", "<init>", "(I)V");
                      break;
  
                  case Type.FLOAT:
                      mg.visitTypeInsn(NEW, "java/lang/Float");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Float", "<init>", "(F)V");
                      break;
  
                  case Type.LONG:
                      mg.visitTypeInsn(NEW, "java/lang/Long");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Long", "<init>", "(J)V");
                      break;
  
                  case Type.DOUBLE:
                      mg.visitTypeInsn(NEW, "java/lang/Double");
                      mg.visitInsn(DUP);
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      mg.visitMethodInsn(INVOKESPECIAL, "java/lang/Double", "<init>", "(D)V");
                      break;
  
                  // ARRAY & OBJECT - no need to copy, just load the arg
                  default:
                      mg.loadArg(i); // for non-static, arg 0 = "this"
                      break;
              }
  
              mg.visitInsn(AASTORE);
          }
  
          return args;
      }