code: void indexPool() throws BadClassFile {
          poolIdx = new int[nextChar()];
          int i = 1;
          while (i < poolIdx.length) {
              poolIdx[i++] = bp;
              byte tag = buf[bp++];
              switch (tag) {
              case CONSTANT_Utf8: case CONSTANT_Unicode: {
                  int len = nextChar();
                  bp = bp + len;
                  break;
              }
              case CONSTANT_Class:
              case CONSTANT_String:
              case CONSTANT_MethodType:
              case CONSTANT_Module:
              case CONSTANT_Package:
                  bp = bp + 2;
                  break;
              case CONSTANT_MethodHandle:
                  bp = bp + 3;
                  break;
              case CONSTANT_Fieldref:
              case CONSTANT_Methodref:
              case CONSTANT_InterfaceMethodref:
              case CONSTANT_NameandType:
              case CONSTANT_Integer:
              case CONSTANT_Float:
              case CONSTANT_InvokeDynamic:
                  bp = bp + 4;
                  break;
              case CONSTANT_Long:
              case CONSTANT_Double:
                  bp = bp + 8;
                  i++;
                  break;
              default:
                  throw new BadClassFile("malformed constant pool");
              }
          }
      }
docs: Index all constant pool entries, writing their start addresses into
  poolIdx.