docs: private static int parseType(final String signature, int pos,
              final SignatureVisitor v) {
          char c;
          int start, end;
          boolean visited, inner;
          String name;
  
          switch (c = signature.charAt(pos++)) {
          case 'Z':
          case 'C':
          case 'B':
          case 'S':
          case 'I':
          case 'F':
          case 'J':
          case 'D':
          case 'V':
              v.visitBaseType(c);
              return pos;
  
          case '[':
              return parseType(signature, pos, v.visitArrayType());
  
          case 'T':
              end = signature.indexOf(';', pos);
              v.visitTypeVariable(signature.substring(pos, end));
              return end + 1;
  
          default: // case 'L':
              start = pos;
              visited = false;
              inner = false;
              for (;;) {
                  switch (c = signature.charAt(pos++)) {
                  case '.':
                  case ';':
                      if (!visited) {
                          name = signature.substring(start, pos - 1);
                          if (inner) {
                              v.visitInnerClassType(name);
                          } else {
                              v.visitClassType(name);
                          }
                      }
                      if (c == ';') {
                          v.visitEnd();
                          return pos;
                      }
                      start = pos;
                      visited = false;
                      inner = true;
                      break;
  
                  case '<':
                      name = signature.substring(start, pos - 1);
                      if (inner) {
                          v.visitInnerClassType(name);
                      } else {
                          v.visitClassType(name);
                      }
                      visited = true;
                      top: for (;;) {
                          switch (c = signature.charAt(pos)) {
                          case '>':
                              break top;
                          case '*':
                              ++pos;
                              v.visitTypeArgument();
                              break;
                          case '+':
                          case '-':
                              pos = parseType(signature, pos + 1,
                                      v.visitTypeArgument(c));
                              break;
                          default:
                              pos = parseType(signature, pos,
                                      v.visitTypeArgument('='));
                              break;
                          }
                      }
                  }
              }
          }
      }