docs: @Override
      public Object getField(FieldDescriptor field) {
          checkFieldDescriptor(field);
          Object result = field.getNumber() == 1 ? getKey() : getValue();
          // Convert enums to EnumValueDescriptor.
          if (field.getType() == FieldDescriptor.Type.ENUM) {
              result = field.getEnumType().findValueByNumberCreatingIfUnknown((java.lang.Integer) result);
          }
          return result;
      }