code: public static MethodDesc forDescriptor(String desc) 
          throws IllegalArgumentException
      {
          try {
              int cursor = 0;
              char c;
  
              if ((c = desc.charAt(cursor++)) != '(') {
                  throw invalidDescriptor(desc);
              }
  
              StringBuffer buf = new StringBuffer();
              List<TypeDesc> list = new ArrayList<TypeDesc>();
  
              while ((c = desc.charAt(cursor++)) != ')') {
                  switch (c) {
                  case 'V':
                  case 'I':
                  case 'C':
                  case 'Z':
                  case 'D':
                  case 'F':
                  case 'J':
                  case 'B':
                  case 'S':
                      buf.append(c);
                      break;
                  case '[':
                      buf.append(c);
                      continue;
                  case 'L':
                      while (true) {
                          buf.append(c);
                          if (c == ';') {
                              break;
                          }
                          c = desc.charAt(cursor++);
                      }
                      break;
                  default:
                      throw invalidDescriptor(desc);
                  }
  
                  list.add(TypeDesc.forDescriptor(buf.toString()));
                  buf.setLength(0);
              }
  
              TypeDesc ret = TypeDesc.forDescriptor(desc.substring(cursor));
  
              TypeDesc[] tds = list.toArray(new TypeDesc[list.size()]);
  
              return intern(new MethodDesc(desc, ret, tds));
          } catch (NullPointerException e) {
              throw invalidDescriptor(desc);
          } catch (IndexOutOfBoundsException e) {
              throw invalidDescriptor(desc);
          }
      }
docs: Acquire a MethodDesc from a type descriptor.