| 199 | } |
| 200 | |
| 201 | absl::Status ParsedMessageValue::GetFieldByNumber( |
| 202 | int64_t number, ProtoWrapperTypeOptions unboxing_options, |
| 203 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 204 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 205 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 206 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 207 | ABSL_DCHECK(message_factory != nullptr); |
| 208 | ABSL_DCHECK(arena != nullptr); |
| 209 | ABSL_DCHECK(result != nullptr); |
| 210 | |
| 211 | const auto* descriptor = GetDescriptor(); |
| 212 | if (number < std::numeric_limits<int32_t>::min() || |
| 213 | number > std::numeric_limits<int32_t>::max()) { |
| 214 | *result = NoSuchFieldError(absl::StrCat(number)); |
| 215 | return absl::OkStatus(); |
| 216 | } |
| 217 | const auto* field = descriptor->FindFieldByNumber(static_cast<int>(number)); |
| 218 | if (field == nullptr) { |
| 219 | *result = NoSuchFieldError(absl::StrCat(number)); |
| 220 | return absl::OkStatus(); |
| 221 | } |
| 222 | return GetField(field, unboxing_options, descriptor_pool, message_factory, |
| 223 | arena, result); |
| 224 | } |
| 225 | |
| 226 | absl::StatusOr<bool> ParsedMessageValue::HasFieldByName( |
| 227 | absl::string_view name) const { |
nothing calls this directly
no test coverage detected