|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
// Protocol Buffers - Google's data interchange format
|
|
|
|
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
|
|
|
// Copyright 2024 Google LLC. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
@ -9,13 +9,6 @@ package com.google.protobuf; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import com.google.protobuf.Descriptors.Descriptor; |
|
|
|
|
import com.google.protobuf.Descriptors.FieldDescriptor; |
|
|
|
|
import com.google.protobuf.Extension.ExtensionType; |
|
|
|
|
import com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder; |
|
|
|
|
import com.google.protobuf.GeneratedMessage.ExtensionDescriptorRetriever; |
|
|
|
|
import com.google.protobuf.GeneratedMessage.FieldAccessorTable; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Stub for GeneratedMessageV3 wrapping GeneratedMessage for compatibility with older gencode. |
|
|
|
|
* |
|
|
|
@ -48,7 +41,7 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage { |
|
|
|
|
MessageT extends ExtendableMessage<MessageT>, |
|
|
|
|
BuilderT extends ExtendableBuilder<MessageT, BuilderT>> |
|
|
|
|
extends GeneratedMessage.ExtendableBuilder<MessageT, BuilderT> |
|
|
|
|
implements ExtendableMessageOrBuilder<MessageT> { |
|
|
|
|
implements GeneratedMessage.ExtendableMessageOrBuilder<MessageT> { |
|
|
|
|
protected ExtendableBuilder() { |
|
|
|
|
super(); |
|
|
|
|
} |
|
|
|
@ -57,13 +50,15 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage { |
|
|
|
|
super(parent); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Support old gencode override method removed in cl/597677225
|
|
|
|
|
// Support old gencode override method removed in
|
|
|
|
|
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
|
|
|
|
|
public <T> BuilderT setExtension( |
|
|
|
|
final GeneratedMessage.GeneratedExtension<MessageT, T> extension, final T value) { |
|
|
|
|
return setExtension((ExtensionLite<MessageT, T>) extension, value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Support old gencode override method removed in cl/597677225
|
|
|
|
|
// Support old gencode override method removed in
|
|
|
|
|
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
|
|
|
|
|
public <T> BuilderT setExtension( |
|
|
|
|
final GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension, |
|
|
|
|
final int index, |
|
|
|
@ -71,13 +66,15 @@ public abstract class GeneratedMessageV3 extends GeneratedMessage { |
|
|
|
|
return setExtension((ExtensionLite<MessageT, List<T>>) extension, index, value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Support old gencode override method removed in cl/597677225
|
|
|
|
|
// Support old gencode override method removed in
|
|
|
|
|
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
|
|
|
|
|
public <T> BuilderT addExtension( |
|
|
|
|
final GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension, final T value) { |
|
|
|
|
return addExtension((ExtensionLite<MessageT, List<T>>) extension, value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Support old gencode override method removed in cl/597677225
|
|
|
|
|
// Support old gencode override method removed in
|
|
|
|
|
// https://github.com/protocolbuffers/protobuf/commit/7bff169d32710b143951ec6ce2c4ea9a56e2ad24
|
|
|
|
|
public <T> BuilderT clearExtension( |
|
|
|
|
final GeneratedMessage.GeneratedExtension<MessageT, T> extension) { |
|
|
|
|
return clearExtension((ExtensionLite<MessageT, T>) extension); |
|
|
|
|