code: static String desc(String desc, int[] pos_inout) {
          int dims = 0;
          int pos = pos_inout[0];
          final int len = desc.length();
  
          while (pos < len && desc.charAt(pos) == '[') {
              pos++;
              dims++;
          }
  
          String name;
  
          if (pos >= len) {
              return null;
          }
  
          char c = desc.charAt(pos++);
          switch (c) {
              case 'Z':
                  name = "boolean";
                  break;
              case 'B':
                  name = "byte";
                  break;
              case 'S':
                  name = "short";
                  break;
              case 'C':
                  name = "char";
                  break;
              case 'I':
                  name = "int";
                  break;
              case 'J':
                  name = "long";
                  break;
              case 'F':
                  name = "float";
                  break;
              case 'D':
                  name = "double";
                  break;
              case 'V':
                  name = "void";
                  break;
              case 'L':
                  int semi = desc.indexOf(';', pos);
                  if (semi == -1) {
                      return null;
                  }
                  name = unslashify(desc.substring(pos, semi));
                  pos = semi + 1;
                  break;
              default:
                  return null;
          }
  
          StringBuilder sb = new StringBuilder(name);
          for (int i = 0; i < dims; i++) {
              sb.append("[]");
          }
          pos_inout[0] = pos;
          return sb.toString();
      }
docs: Converts one type descriptor to a readable string, starting
  from position {@code pos_inout[0]}, and updating it to the
  location following the descriptor just parsed. A type descriptor
  mostly corresponds to a FieldType in JVMS 4.3.2. It can be one of a
  BaseType (a single character denoting a primitive, plus void),
  an object type ("Lname;"), or an array type (one more more '[' followed
  by a base or object type).
  
  @param desc a string possibly containing several descriptors
  @param pos_inout on input, the start position; on return, the position
  following the just-parsed descriptor
  @return the result string