code: private static int getData(int id) {
          switch (id) {
          case CONSTANT_CLASS:
          case CONSTANT_STRING:
              return 2;
          case CONSTANT_INTEGER:
          case CONSTANT_FLOAT:
          case CONSTANT_FIELDREF:
          case CONSTANT_METHODREF:
          case CONSTANT_INTERFACEMETHODREF:
          case CONSTANT_NAMEANDTYPE:
              return 4;
          case CONSTANT_LONG:
          case CONSTANT_DOUBLE:
              return 8;
          case CONSTANT_UTF8:
              return -1;
          default:
              throw new RuntimeException("unknown id: " + id);
          }
      }
docs: --