code: public static TypeDesc forDescriptor(String desc)
          throws IllegalArgumentException
      {
          // TODO: Figure out how to cache these. Using a plain IdentityMap poses
          // a problem. The back reference to the key causes a memory leak.
  
          TypeDesc td;
          int cursor = 0;
          int dim = 0;
          try {
              char c;
              while ((c = desc.charAt(cursor++)) == '[') {
                  dim++;
              }
  
              switch (c) {
              case 'V':
                  td = VOID;
                  break;
              case 'Z':
                  td = BOOLEAN;
                  break;
              case 'C':
                  td = CHAR;
                  break;
              case 'B':
                  td = BYTE;
                  break;
              case 'S':
                  td = SHORT;
                  break;
              case 'I':
                  td = INT;
                  break;
              case 'J':
                  td = LONG;
                  break;
              case 'F':
                  td = FLOAT;
                  break;
              case 'D':
                  td = DOUBLE;
                  break;
              case 'L':
                  if (dim > 0) {
                      desc = desc.substring(dim);
                      cursor = 1;
                  }
                  StringBuffer name = new StringBuffer(desc.length() - 2);
                  while ((c = desc.charAt(cursor++)) != ';') {
                      if (c == '/') {
                          c = '.';
                      }
                      name.append(c);
                  }
                  td = intern(new ObjectType(desc, name.toString()));
                  break;
              default:
                  throw invalidDescriptor(desc);
              }
          }
          catch (NullPointerException e) {
              throw invalidDescriptor(desc);
          }
          catch (IndexOutOfBoundsException e) {
              throw invalidDescriptor(desc);
          }
  
          if (cursor != desc.length()) {
              throw invalidDescriptor(desc);
          }
  
          while (--dim >= 0) {
              td = td.toArrayType();
          }
  
          return td;
      }
docs: Acquire a TypeDesc from a type descriptor. This syntax is described in
  section 4.3.2, Field Descriptors.