docs: final int getFieldId()
      {
          int id;
  
          if (_field_name_type == null) {
              throw new IllegalStateException("the field has not be set");
          }
          switch (_field_name_type) {
          case STRING:
                  try {
                      id = add_symbol(_field_name);
                  }
                  catch (IOException e) {
                      throw new IonException(e);
                  }
                  // TODO cache the sid?
              break;
          case INT:
              id = _field_name_sid;
              break;
          default:
              throw new IllegalStateException("the field has not be set");
          }
  
          return id;
      }