diff --git a/protobuf-api/src/main/java/com/google/protobuf/AbstractMessage.java b/protobuf-api/src/main/java/com/google/protobuf/AbstractMessage.java index f383625..9c6e207 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/AbstractMessage.java +++ b/protobuf-api/src/main/java/com/google/protobuf/AbstractMessage.java @@ -39,7 +39,7 @@ public boolean isInitialized() { * Interface for the parent of a Builder that allows the builder to communicate invalidations back * to the parent for use when using nested builders. */ - protected interface BuilderParent { + protected interface BuilderParent extends Message.BuilderParent{ /** * A builder becomes dirty whenever a field is modified -- including fields in nested builders diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Any.java b/protobuf-api/src/main/java/com/google/protobuf/Any.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Any.java rename to protobuf-api/src/main/java/com/google/protobuf/Any.java index 74c8085..d950290 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Any.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Any.java @@ -96,12 +96,12 @@ * Protobuf type {@code google.protobuf.Any} */ public final class Any extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Any) AnyOrBuilder { private static final long serialVersionUID = 0L; // Use Any.newBuilder() to construct. - private Any(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Any(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Any() { @@ -122,7 +122,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -355,8 +355,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(typeUrl_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, typeUrl_); } if (!value_.isEmpty()) { output.writeBytes(2, value_); @@ -370,8 +370,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(typeUrl_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, typeUrl_); } if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream @@ -450,20 +450,20 @@ public static com.google.protobuf.Any parseFrom( } public static com.google.protobuf.Any parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Any parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Any parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -471,20 +471,20 @@ public static com.google.protobuf.Any parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Any parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Any parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -504,7 +504,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -600,7 +600,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Any} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Any) com.google.protobuf.AnyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -609,7 +609,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.AnyProto.internal_static_google_protobuf_Any_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -622,7 +622,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/AnyOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/AnyOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/AnyOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/AnyOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/AnyProto.java b/protobuf-api/src/main/java/com/google/protobuf/AnyProto.java similarity index 92% rename from protobuf-sdk/src/main/java/com/google/protobuf/AnyProto.java rename to protobuf-api/src/main/java/com/google/protobuf/AnyProto.java index 2121cd2..e312d05 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/AnyProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/AnyProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Any_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Any_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -43,7 +43,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_Any_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Any_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Any_descriptor, new java.lang.String[] { "TypeUrl", "Value", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Api.java b/protobuf-api/src/main/java/com/google/protobuf/Api.java similarity index 97% rename from protobuf-sdk/src/main/java/com/google/protobuf/Api.java rename to protobuf-api/src/main/java/com/google/protobuf/Api.java index afd6947..22b8493 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Api.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Api.java @@ -20,12 +20,12 @@ * Protobuf type {@code google.protobuf.Api} */ public final class Api extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Api) ApiOrBuilder { private static final long serialVersionUID = 0L; // Use Api.newBuilder() to construct. - private Api(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Api(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Api() { @@ -50,7 +50,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -454,8 +454,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < methods_.size(); i++) { output.writeMessage(2, methods_.get(i)); @@ -463,8 +463,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < options_.size(); i++) { output.writeMessage(3, options_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 4, version_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getSourceContext()); @@ -484,8 +484,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < methods_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -495,8 +495,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, options_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(4, version_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -613,20 +613,20 @@ public static com.google.protobuf.Api parseFrom( } public static com.google.protobuf.Api parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Api parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Api parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -634,20 +634,20 @@ public static com.google.protobuf.Api parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Api parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Api parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -667,7 +667,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -687,7 +687,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Api} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Api) com.google.protobuf.ApiOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -696,7 +696,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Api_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -709,12 +709,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getMethodsFieldBuilder(); getOptionsFieldBuilder(); @@ -906,7 +906,7 @@ public Builder mergeFrom(com.google.protobuf.Api other) { methods_ = other.methods_; bitField0_ = (bitField0_ & ~0x00000002); methodsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getMethodsFieldBuilder() : null; } else { methodsBuilder_.addAllMessages(other.methods_); @@ -932,7 +932,7 @@ public Builder mergeFrom(com.google.protobuf.Api other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000004); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); @@ -966,7 +966,7 @@ public Builder mergeFrom(com.google.protobuf.Api other) { mixins_ = other.mixins_; bitField0_ = (bitField0_ & ~0x00000020); mixinsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getMixinsFieldBuilder() : null; } else { mixinsBuilder_.addAllMessages(other.mixins_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/ApiOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/ApiOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/ApiOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/ApiOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/ApiProto.java b/protobuf-api/src/main/java/com/google/protobuf/ApiProto.java similarity index 90% rename from protobuf-sdk/src/main/java/com/google/protobuf/ApiProto.java rename to protobuf-api/src/main/java/com/google/protobuf/ApiProto.java index e96e7b2..e12d52e 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/ApiProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/ApiProto.java @@ -18,17 +18,17 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Api_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Api_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Method_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Method_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Mixin_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Mixin_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -68,19 +68,19 @@ public static void registerAllExtensions( internal_static_google_protobuf_Api_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Api_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Api_descriptor, new java.lang.String[] { "Name", "Methods", "Options", "Version", "SourceContext", "Mixins", "Syntax", }); internal_static_google_protobuf_Method_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_protobuf_Method_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Method_descriptor, new java.lang.String[] { "Name", "RequestTypeUrl", "RequestStreaming", "ResponseTypeUrl", "ResponseStreaming", "Options", "Syntax", }); internal_static_google_protobuf_Mixin_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_protobuf_Mixin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Mixin_descriptor, new java.lang.String[] { "Name", "Root", }); com.google.protobuf.SourceContextProto.getDescriptor(); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/BoolValue.java b/protobuf-api/src/main/java/com/google/protobuf/BoolValue.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/BoolValue.java rename to protobuf-api/src/main/java/com/google/protobuf/BoolValue.java index a015e51..c3b51ee 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/BoolValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/BoolValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.BoolValue} */ public final class BoolValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.BoolValue) BoolValueOrBuilder { private static final long serialVersionUID = 0L; // Use BoolValue.newBuilder() to construct. - private BoolValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BoolValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private BoolValue() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -160,20 +160,20 @@ public static com.google.protobuf.BoolValue parseFrom( } public static com.google.protobuf.BoolValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.BoolValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.BoolValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -181,20 +181,20 @@ public static com.google.protobuf.BoolValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.BoolValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.BoolValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -214,7 +214,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -228,7 +228,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.BoolValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.BoolValue) com.google.protobuf.BoolValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -237,7 +237,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BoolValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -250,7 +250,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/BoolValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/BoolValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/BoolValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/BoolValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/BytesValue.java b/protobuf-api/src/main/java/com/google/protobuf/BytesValue.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/BytesValue.java rename to protobuf-api/src/main/java/com/google/protobuf/BytesValue.java index 44eaefe..8b70f3e 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/BytesValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/BytesValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.BytesValue} */ public final class BytesValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.BytesValue) BytesValueOrBuilder { private static final long serialVersionUID = 0L; // Use BytesValue.newBuilder() to construct. - private BytesValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BytesValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private BytesValue() { @@ -39,7 +39,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -160,20 +160,20 @@ public static com.google.protobuf.BytesValue parseFrom( } public static com.google.protobuf.BytesValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.BytesValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.BytesValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -181,20 +181,20 @@ public static com.google.protobuf.BytesValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.BytesValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.BytesValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -214,7 +214,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -228,7 +228,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.BytesValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.BytesValue) com.google.protobuf.BytesValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -237,7 +237,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_BytesValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -250,7 +250,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/BytesValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/BytesValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/BytesValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/BytesValueOrBuilder.java diff --git a/protobuf-api/src/main/java/com/google/protobuf/DescriptorProtos.java b/protobuf-api/src/main/java/com/google/protobuf/DescriptorProtos.java index bc20823..28e300d 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/DescriptorProtos.java +++ b/protobuf-api/src/main/java/com/google/protobuf/DescriptorProtos.java @@ -273,7 +273,7 @@ private Edition(int value) { public interface FileDescriptorSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.FileDescriptorSet) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -309,13 +309,13 @@ com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder getFileOrBuild * Protobuf type {@code google.protobuf.FileDescriptorSet} */ public static final class FileDescriptorSet extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< FileDescriptorSet> implements // @@protoc_insertion_point(message_implements:google.protobuf.FileDescriptorSet) FileDescriptorSetOrBuilder { private static final long serialVersionUID = 0L; // Use FileDescriptorSet.newBuilder() to construct. - private FileDescriptorSet(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private FileDescriptorSet(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private FileDescriptorSet() { @@ -335,7 +335,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileDescriptorSet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -407,7 +407,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); for (int i = 0; i < file_.size(); i++) { @@ -502,20 +502,20 @@ public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseFrom( } public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -523,20 +523,20 @@ public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseDelimi java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileDescriptorSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -556,7 +556,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -569,7 +569,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FileDescriptorSet} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.FileDescriptorSet, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.FileDescriptorSet) com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder { @@ -579,7 +579,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileDescriptorSet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -592,7 +592,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -687,33 +687,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileDescriptorSet, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileDescriptorSet, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileDescriptorSet, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileDescriptorSet, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.FileDescriptorSet) { @@ -745,7 +745,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileDescriptorSet file_ = other.file_; bitField0_ = (bitField0_ & ~0x00000001); fileBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getFileFieldBuilder() : null; } else { fileBuilder_.addAllMessages(other.file_); @@ -1531,12 +1531,12 @@ com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder getExtensionO * Protobuf type {@code google.protobuf.FileDescriptorProto} */ public static final class FileDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FileDescriptorProto) FileDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use FileDescriptorProto.newBuilder() to construct. - private FileDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FileDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FileDescriptorProto() { @@ -1567,7 +1567,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2254,13 +2254,13 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, package_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, package_); } for (int i = 0; i < dependency_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dependency_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, dependency_.getRaw(i)); } for (int i = 0; i < messageType_.size(); i++) { output.writeMessage(4, messageType_.get(i)); @@ -2287,7 +2287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32(11, weakDependency_.getInt(i)); } if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, syntax_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 12, syntax_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeEnum(14, edition_); @@ -2302,10 +2302,10 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, package_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, package_); } { int dataSize = 0; @@ -2358,7 +2358,7 @@ public int getSerializedSize() { size += 1 * getWeakDependencyList().size(); } if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, syntax_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(12, syntax_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -2524,20 +2524,20 @@ public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseFrom } public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -2545,20 +2545,20 @@ public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseDeli java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2578,7 +2578,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2590,7 +2590,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FileDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FileDescriptorProto) com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2599,7 +2599,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2612,12 +2612,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getMessageTypeFieldBuilder(); getEnumTypeFieldBuilder(); @@ -2899,7 +2899,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileDescriptorProt messageType_ = other.messageType_; bitField0_ = (bitField0_ & ~0x00000020); messageTypeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getMessageTypeFieldBuilder() : null; } else { messageTypeBuilder_.addAllMessages(other.messageType_); @@ -2925,7 +2925,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileDescriptorProt enumType_ = other.enumType_; bitField0_ = (bitField0_ & ~0x00000040); enumTypeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getEnumTypeFieldBuilder() : null; } else { enumTypeBuilder_.addAllMessages(other.enumType_); @@ -2951,7 +2951,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileDescriptorProt service_ = other.service_; bitField0_ = (bitField0_ & ~0x00000080); serviceBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getServiceFieldBuilder() : null; } else { serviceBuilder_.addAllMessages(other.service_); @@ -2977,7 +2977,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileDescriptorProt extension_ = other.extension_; bitField0_ = (bitField0_ & ~0x00000100); extensionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getExtensionFieldBuilder() : null; } else { extensionBuilder_.addAllMessages(other.extension_); @@ -5654,12 +5654,12 @@ com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder getR * Protobuf type {@code google.protobuf.DescriptorProto} */ public static final class DescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.DescriptorProto) DescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use DescriptorProto.newBuilder() to construct. - private DescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private DescriptorProto() { @@ -5688,7 +5688,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -5756,12 +5756,12 @@ public interface ExtensionRangeOrBuilder extends * Protobuf type {@code google.protobuf.DescriptorProto.ExtensionRange} */ public static final class ExtensionRange extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.DescriptorProto.ExtensionRange) ExtensionRangeOrBuilder { private static final long serialVersionUID = 0L; // Use ExtensionRange.newBuilder() to construct. - private ExtensionRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExtensionRange(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private ExtensionRange() { @@ -5780,7 +5780,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6010,20 +6010,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRang } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -6031,20 +6031,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRang java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -6064,7 +6064,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6072,7 +6072,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.DescriptorProto.ExtensionRange} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.DescriptorProto.ExtensionRange) com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6081,7 +6081,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6094,12 +6094,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOptionsFieldBuilder(); } @@ -6632,12 +6632,12 @@ public interface ReservedRangeOrBuilder extends * Protobuf type {@code google.protobuf.DescriptorProto.ReservedRange} */ public static final class ReservedRange extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.DescriptorProto.ReservedRange) ReservedRangeOrBuilder { private static final long serialVersionUID = 0L; // Use ReservedRange.newBuilder() to construct. - private ReservedRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReservedRange(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private ReservedRange() { @@ -6656,7 +6656,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_ReservedRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6838,20 +6838,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -6859,20 +6859,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -6892,7 +6892,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6906,7 +6906,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.DescriptorProto.ReservedRange} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.DescriptorProto.ReservedRange) com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6915,7 +6915,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_ReservedRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6928,7 +6928,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -7738,7 +7738,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < field_.size(); i++) { output.writeMessage(2, field_.get(i)); @@ -7765,7 +7765,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeMessage(9, reservedRange_.get(i)); } for (int i = 0; i < reservedName_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, reservedName_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 10, reservedName_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -7777,7 +7777,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < field_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -7950,20 +7950,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto parseFrom( } public static com.google.protobuf.DescriptorProtos.DescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -7971,20 +7971,20 @@ public static com.google.protobuf.DescriptorProtos.DescriptorProto parseDelimite java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.DescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.DescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -8004,7 +8004,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -8016,7 +8016,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.DescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.DescriptorProto) com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -8025,7 +8025,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_DescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8038,12 +8038,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFieldFieldBuilder(); getExtensionFieldBuilder(); @@ -8302,7 +8302,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot field_ = other.field_; bitField0_ = (bitField0_ & ~0x00000002); fieldBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getFieldFieldBuilder() : null; } else { fieldBuilder_.addAllMessages(other.field_); @@ -8328,7 +8328,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot extension_ = other.extension_; bitField0_ = (bitField0_ & ~0x00000004); extensionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getExtensionFieldBuilder() : null; } else { extensionBuilder_.addAllMessages(other.extension_); @@ -8354,7 +8354,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot nestedType_ = other.nestedType_; bitField0_ = (bitField0_ & ~0x00000008); nestedTypeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getNestedTypeFieldBuilder() : null; } else { nestedTypeBuilder_.addAllMessages(other.nestedType_); @@ -8380,7 +8380,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot enumType_ = other.enumType_; bitField0_ = (bitField0_ & ~0x00000010); enumTypeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getEnumTypeFieldBuilder() : null; } else { enumTypeBuilder_.addAllMessages(other.enumType_); @@ -8406,7 +8406,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot extensionRange_ = other.extensionRange_; bitField0_ = (bitField0_ & ~0x00000020); extensionRangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getExtensionRangeFieldBuilder() : null; } else { extensionRangeBuilder_.addAllMessages(other.extensionRange_); @@ -8432,7 +8432,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot oneofDecl_ = other.oneofDecl_; bitField0_ = (bitField0_ & ~0x00000040); oneofDeclBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOneofDeclFieldBuilder() : null; } else { oneofDeclBuilder_.addAllMessages(other.oneofDecl_); @@ -8461,7 +8461,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.DescriptorProto ot reservedRange_ = other.reservedRange_; bitField0_ = (bitField0_ & ~0x00000100); reservedRangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getReservedRangeFieldBuilder() : null; } else { reservedRangeBuilder_.addAllMessages(other.reservedRange_); @@ -10766,7 +10766,7 @@ public com.google.protobuf.DescriptorProtos.DescriptorProto getDefaultInstanceFo public interface ExtensionRangeOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.ExtensionRangeOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -10921,13 +10921,13 @@ com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder * Protobuf type {@code google.protobuf.ExtensionRangeOptions} */ public static final class ExtensionRangeOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< ExtensionRangeOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.ExtensionRangeOptions) ExtensionRangeOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use ExtensionRangeOptions.newBuilder() to construct. - private ExtensionRangeOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private ExtensionRangeOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private ExtensionRangeOptions() { @@ -10949,7 +10949,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ExtensionRangeOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -11202,12 +11202,12 @@ public interface DeclarationOrBuilder extends * Protobuf type {@code google.protobuf.ExtensionRangeOptions.Declaration} */ public static final class Declaration extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.ExtensionRangeOptions.Declaration) DeclarationOrBuilder { private static final long serialVersionUID = 0L; // Use Declaration.newBuilder() to construct. - private Declaration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Declaration(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Declaration() { @@ -11228,7 +11228,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ExtensionRangeOptions_Declaration_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -11472,10 +11472,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32(1, number_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullName_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, fullName_); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, type_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeBool(5, reserved_); @@ -11497,10 +11497,10 @@ public int getSerializedSize() { .computeInt32Size(1, number_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullName_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, fullName_); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, type_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -11622,20 +11622,20 @@ public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declara } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declaration parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declaration parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declaration parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -11643,20 +11643,20 @@ public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declara java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declaration parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Declaration parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -11676,7 +11676,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -11684,7 +11684,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.ExtensionRangeOptions.Declaration} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.ExtensionRangeOptions.Declaration) com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -11693,7 +11693,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ExtensionRangeOptions_Declaration_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -11706,7 +11706,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -12607,7 +12607,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); for (int i = 0; i < declaration_.size(); i++) { @@ -12746,20 +12746,20 @@ public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseFr } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -12767,20 +12767,20 @@ public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseDe java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ExtensionRangeOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -12800,7 +12800,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -12808,7 +12808,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.ExtensionRangeOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.ExtensionRangeOptions) com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder { @@ -12818,7 +12818,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ExtensionRangeOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -12831,12 +12831,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getUninterpretedOptionFieldBuilder(); getDeclarationFieldBuilder(); @@ -12968,33 +12968,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ExtensionRangeOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.ExtensionRangeOptions) { @@ -13026,7 +13026,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.ExtensionRangeOpti uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000001); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -13052,7 +13052,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.ExtensionRangeOpti declaration_ = other.declaration_; bitField0_ = (bitField0_ & ~0x00000002); declarationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getDeclarationFieldBuilder() : null; } else { declarationBuilder_.addAllMessages(other.declaration_); @@ -14429,12 +14429,12 @@ public interface FieldDescriptorProtoOrBuilder extends * Protobuf type {@code google.protobuf.FieldDescriptorProto} */ public static final class FieldDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FieldDescriptorProto) FieldDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use FieldDescriptorProto.newBuilder() to construct. - private FieldDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FieldDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FieldDescriptorProto() { @@ -14460,7 +14460,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -15445,10 +15445,10 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000020) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, extendee_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, extendee_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(3, number_); @@ -15460,10 +15460,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeEnum(5, type_); } if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, typeName_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 6, typeName_); } if (((bitField0_ & 0x00000040) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, defaultValue_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 7, defaultValue_); } if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(8, getOptions()); @@ -15472,7 +15472,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32(9, oneofIndex_); } if (((bitField0_ & 0x00000100) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, jsonName_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 10, jsonName_); } if (((bitField0_ & 0x00000400) != 0)) { output.writeBool(17, proto3Optional_); @@ -15487,10 +15487,10 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, extendee_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, extendee_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -15505,10 +15505,10 @@ public int getSerializedSize() { .computeEnumSize(5, type_); } if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, typeName_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(6, typeName_); } if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, defaultValue_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(7, defaultValue_); } if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -15519,7 +15519,7 @@ public int getSerializedSize() { .computeInt32Size(9, oneofIndex_); } if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, jsonName_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(10, jsonName_); } if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -15688,20 +15688,20 @@ public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseFro } public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -15709,20 +15709,20 @@ public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseDel java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -15742,7 +15742,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -15754,7 +15754,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FieldDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FieldDescriptorProto) com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -15763,7 +15763,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -15776,12 +15776,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOptionsFieldBuilder(); } @@ -17224,12 +17224,12 @@ public interface OneofDescriptorProtoOrBuilder extends * Protobuf type {@code google.protobuf.OneofDescriptorProto} */ public static final class OneofDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.OneofDescriptorProto) OneofDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use OneofDescriptorProto.newBuilder() to construct. - private OneofDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OneofDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private OneofDescriptorProto() { @@ -17249,7 +17249,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_OneofDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -17353,7 +17353,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getOptions()); @@ -17368,7 +17368,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -17457,20 +17457,20 @@ public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseFro } public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -17478,20 +17478,20 @@ public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseDel java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.OneofDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -17511,7 +17511,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -17523,7 +17523,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.OneofDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.OneofDescriptorProto) com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -17532,7 +17532,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_OneofDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -17545,12 +17545,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOptionsFieldBuilder(); } @@ -18155,12 +18155,12 @@ com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuil * Protobuf type {@code google.protobuf.EnumDescriptorProto} */ public static final class EnumDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumDescriptorProto) EnumDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use EnumDescriptorProto.newBuilder() to construct. - private EnumDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EnumDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private EnumDescriptorProto() { @@ -18184,7 +18184,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -18246,12 +18246,12 @@ public interface EnumReservedRangeOrBuilder extends * Protobuf type {@code google.protobuf.EnumDescriptorProto.EnumReservedRange} */ public static final class EnumReservedRange extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumDescriptorProto.EnumReservedRange) EnumReservedRangeOrBuilder { private static final long serialVersionUID = 0L; // Use EnumReservedRange.newBuilder() to construct. - private EnumReservedRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EnumReservedRange(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private EnumReservedRange() { @@ -18270,7 +18270,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -18452,20 +18452,20 @@ public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReser } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -18473,20 +18473,20 @@ public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReser java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -18506,7 +18506,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -18523,7 +18523,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumDescriptorProto.EnumReservedRange} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumDescriptorProto.EnumReservedRange) com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -18532,7 +18532,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -18545,7 +18545,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -19150,7 +19150,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < value_.size(); i++) { output.writeMessage(2, value_.get(i)); @@ -19162,7 +19162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeMessage(4, reservedRange_.get(i)); } for (int i = 0; i < reservedName_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, reservedName_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 5, reservedName_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -19174,7 +19174,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < value_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -19297,20 +19297,20 @@ public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseFrom } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -19318,20 +19318,20 @@ public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseDeli java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -19351,7 +19351,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -19363,7 +19363,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumDescriptorProto) com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -19372,7 +19372,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -19385,12 +19385,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getValueFieldBuilder(); getOptionsFieldBuilder(); @@ -19564,7 +19564,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.EnumDescriptorProt value_ = other.value_; bitField0_ = (bitField0_ & ~0x00000002); valueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getValueFieldBuilder() : null; } else { valueBuilder_.addAllMessages(other.value_); @@ -19593,7 +19593,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.EnumDescriptorProt reservedRange_ = other.reservedRange_; bitField0_ = (bitField0_ & ~0x00000008); reservedRangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getReservedRangeFieldBuilder() : null; } else { reservedRangeBuilder_.addAllMessages(other.reservedRange_); @@ -20769,12 +20769,12 @@ public interface EnumValueDescriptorProtoOrBuilder extends * Protobuf type {@code google.protobuf.EnumValueDescriptorProto} */ public static final class EnumValueDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumValueDescriptorProto) EnumValueDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use EnumValueDescriptorProto.newBuilder() to construct. - private EnumValueDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EnumValueDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private EnumValueDescriptorProto() { @@ -20794,7 +20794,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -20917,7 +20917,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(2, number_); @@ -20935,7 +20935,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -21037,20 +21037,20 @@ public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto pars } public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -21058,20 +21058,20 @@ public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto pars java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -21091,7 +21091,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -21103,7 +21103,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumValueDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValueDescriptorProto) com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -21112,7 +21112,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -21125,12 +21125,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOptionsFieldBuilder(); } @@ -21689,12 +21689,12 @@ com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder getMethodOrB * Protobuf type {@code google.protobuf.ServiceDescriptorProto} */ public static final class ServiceDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.ServiceDescriptorProto) ServiceDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use ServiceDescriptorProto.newBuilder() to construct. - private ServiceDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ServiceDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private ServiceDescriptorProto() { @@ -21715,7 +21715,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -21866,7 +21866,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < method_.size(); i++) { output.writeMessage(2, method_.get(i)); @@ -21884,7 +21884,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < method_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -21983,20 +21983,20 @@ public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseF } public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -22004,20 +22004,20 @@ public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseD java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ServiceDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -22037,7 +22037,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -22049,7 +22049,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.ServiceDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.ServiceDescriptorProto) com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -22058,7 +22058,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -22071,12 +22071,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getMethodFieldBuilder(); getOptionsFieldBuilder(); @@ -22227,7 +22227,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.ServiceDescriptorP method_ = other.method_; bitField0_ = (bitField0_ & ~0x00000002); methodBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getMethodFieldBuilder() : null; } else { methodBuilder_.addAllMessages(other.method_); @@ -22950,12 +22950,12 @@ public interface MethodDescriptorProtoOrBuilder extends * Protobuf type {@code google.protobuf.MethodDescriptorProto} */ public static final class MethodDescriptorProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.MethodDescriptorProto) MethodDescriptorProtoOrBuilder { private static final long serialVersionUID = 0L; // Use MethodDescriptorProto.newBuilder() to construct. - private MethodDescriptorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MethodDescriptorProto(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private MethodDescriptorProto() { @@ -22977,7 +22977,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -23248,13 +23248,13 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, inputType_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, inputType_); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, outputType_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, outputType_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(4, getOptions()); @@ -23275,13 +23275,13 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, inputType_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, inputType_); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, outputType_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, outputType_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -23416,20 +23416,20 @@ public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseFr } public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -23437,20 +23437,20 @@ public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseDe java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MethodDescriptorProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -23470,7 +23470,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -23482,7 +23482,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.MethodDescriptorProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.MethodDescriptorProto) com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -23491,7 +23491,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -23504,12 +23504,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOptionsFieldBuilder(); } @@ -24307,7 +24307,7 @@ public com.google.protobuf.DescriptorProtos.MethodDescriptorProto getDefaultInst public interface FileOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.FileOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -24960,13 +24960,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.FileOptions} */ public static final class FileOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< FileOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.FileOptions) FileOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use FileOptions.newBuilder() to construct. - private FileOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private FileOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private FileOptions() { @@ -24998,7 +24998,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -26234,14 +26234,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, javaPackage_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, javaPackage_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, javaOuterClassname_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 8, javaOuterClassname_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeEnum(9, optimizeFor_); @@ -26250,7 +26250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBool(10, javaMultipleFiles_); } if (((bitField0_ & 0x00000040) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, goPackage_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 11, goPackage_); } if (((bitField0_ & 0x00000080) != 0)) { output.writeBool(16, ccGenericServices_); @@ -26274,25 +26274,25 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBool(31, ccEnableArenas_); } if (((bitField0_ & 0x00001000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 36, objcClassPrefix_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 36, objcClassPrefix_); } if (((bitField0_ & 0x00002000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 37, csharpNamespace_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 37, csharpNamespace_); } if (((bitField0_ & 0x00004000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 39, swiftPrefix_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 39, swiftPrefix_); } if (((bitField0_ & 0x00008000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 40, phpClassPrefix_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 40, phpClassPrefix_); } if (((bitField0_ & 0x00010000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 41, phpNamespace_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 41, phpNamespace_); } if (((bitField0_ & 0x00020000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 44, phpMetadataNamespace_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 44, phpMetadataNamespace_); } if (((bitField0_ & 0x00040000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 45, rubyPackage_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 45, rubyPackage_); } if (((bitField0_ & 0x00080000) != 0)) { output.writeMessage(50, getFeatures()); @@ -26311,10 +26311,10 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, javaPackage_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, javaPackage_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, javaOuterClassname_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(8, javaOuterClassname_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -26325,7 +26325,7 @@ public int getSerializedSize() { .computeBoolSize(10, javaMultipleFiles_); } if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, goPackage_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(11, goPackage_); } if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -26356,25 +26356,25 @@ public int getSerializedSize() { .computeBoolSize(31, ccEnableArenas_); } if (((bitField0_ & 0x00001000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, objcClassPrefix_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(36, objcClassPrefix_); } if (((bitField0_ & 0x00002000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37, csharpNamespace_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(37, csharpNamespace_); } if (((bitField0_ & 0x00004000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, swiftPrefix_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(39, swiftPrefix_); } if (((bitField0_ & 0x00008000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(40, phpClassPrefix_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(40, phpClassPrefix_); } if (((bitField0_ & 0x00010000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(41, phpNamespace_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(41, phpNamespace_); } if (((bitField0_ & 0x00020000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(44, phpMetadataNamespace_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(44, phpMetadataNamespace_); } if (((bitField0_ & 0x00040000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(45, rubyPackage_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(45, rubyPackage_); } if (((bitField0_ & 0x00080000) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -26646,20 +26646,20 @@ public static com.google.protobuf.DescriptorProtos.FileOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.FileOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -26667,20 +26667,20 @@ public static com.google.protobuf.DescriptorProtos.FileOptions parseDelimitedFro java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FileOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FileOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -26700,7 +26700,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -26708,7 +26708,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FileOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.FileOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.FileOptions) com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder { @@ -26718,7 +26718,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FileOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -26731,12 +26731,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -26941,33 +26941,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FileOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.FileOptions) { @@ -27079,7 +27079,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FileOptions other) uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00100000); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -29590,7 +29590,7 @@ public com.google.protobuf.DescriptorProtos.FileOptions getDefaultInstanceForTyp public interface MessageOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.MessageOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -29878,13 +29878,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.MessageOptions} */ public static final class MessageOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< MessageOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.MessageOptions) MessageOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use MessageOptions.newBuilder() to construct. - private MessageOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private MessageOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private MessageOptions() { @@ -29904,7 +29904,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MessageOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -30291,7 +30291,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -30487,20 +30487,20 @@ public static com.google.protobuf.DescriptorProtos.MessageOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.MessageOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MessageOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MessageOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -30508,20 +30508,20 @@ public static com.google.protobuf.DescriptorProtos.MessageOptions parseDelimited java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MessageOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MessageOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -30541,7 +30541,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -30549,7 +30549,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.MessageOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.MessageOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.MessageOptions) com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder { @@ -30559,7 +30559,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MessageOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -30572,12 +30572,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -30712,33 +30712,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MessageOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MessageOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MessageOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MessageOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.MessageOptions) { @@ -30788,7 +30788,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.MessageOptions oth uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000040); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -31950,7 +31950,7 @@ public com.google.protobuf.DescriptorProtos.MessageOptions getDefaultInstanceFor public interface FieldOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.FieldOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -32354,13 +32354,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.FieldOptions} */ public static final class FieldOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< FieldOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.FieldOptions) FieldOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use FieldOptions.newBuilder() to construct. - private FieldOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private FieldOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private FieldOptions() { @@ -32385,7 +32385,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -32983,12 +32983,12 @@ public interface EditionDefaultOrBuilder extends * Protobuf type {@code google.protobuf.FieldOptions.EditionDefault} */ public static final class EditionDefault extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FieldOptions.EditionDefault) EditionDefaultOrBuilder { private static final long serialVersionUID = 0L; // Use EditionDefault.newBuilder() to construct. - private EditionDefault(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EditionDefault(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private EditionDefault() { @@ -33009,7 +33009,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_EditionDefault_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -33111,7 +33111,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, value_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeEnum(3, edition_); @@ -33126,7 +33126,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, value_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -33214,20 +33214,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault p } public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -33235,20 +33235,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault p java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefault parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -33268,7 +33268,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -33276,7 +33276,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FieldOptions.EditionDefault} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FieldOptions.EditionDefault) com.google.protobuf.DescriptorProtos.FieldOptions.EditionDefaultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -33285,7 +33285,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_EditionDefault_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -33298,7 +33298,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -33785,12 +33785,12 @@ public interface FeatureSupportOrBuilder extends * Protobuf type {@code google.protobuf.FieldOptions.FeatureSupport} */ public static final class FeatureSupport extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FieldOptions.FeatureSupport) FeatureSupportOrBuilder { private static final long serialVersionUID = 0L; // Use FeatureSupport.newBuilder() to construct. - private FeatureSupport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureSupport(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FeatureSupport() { @@ -33813,7 +33813,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_FeatureSupport_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -33994,7 +33994,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeEnum(2, editionDeprecated_); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deprecationWarning_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, deprecationWarning_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeEnum(4, editionRemoved_); @@ -34017,7 +34017,7 @@ public int getSerializedSize() { .computeEnumSize(2, editionDeprecated_); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deprecationWarning_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, deprecationWarning_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -34121,20 +34121,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport p } public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -34142,20 +34142,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport p java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupport parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -34175,7 +34175,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -34187,7 +34187,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FieldOptions.FeatureSupport} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FieldOptions.FeatureSupport) com.google.protobuf.DescriptorProtos.FieldOptions.FeatureSupportOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -34196,7 +34196,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_FeatureSupport_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -34209,7 +34209,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -35358,7 +35358,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -35662,20 +35662,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.FieldOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -35683,20 +35683,20 @@ public static com.google.protobuf.DescriptorProtos.FieldOptions parseDelimitedFr java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FieldOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FieldOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -35716,7 +35716,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -35724,7 +35724,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FieldOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.FieldOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.FieldOptions) com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder { @@ -35734,7 +35734,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FieldOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -35747,12 +35747,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getEditionDefaultsFieldBuilder(); getFeaturesFieldBuilder(); @@ -35943,33 +35943,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FieldOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FieldOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FieldOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FieldOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.FieldOptions) { @@ -36038,7 +36038,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FieldOptions other editionDefaults_ = other.editionDefaults_; bitField0_ = (bitField0_ & ~0x00000400); editionDefaultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getEditionDefaultsFieldBuilder() : null; } else { editionDefaultsBuilder_.addAllMessages(other.editionDefaults_); @@ -36070,7 +36070,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FieldOptions other uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00002000); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -37967,7 +37967,7 @@ public com.google.protobuf.DescriptorProtos.FieldOptions getDefaultInstanceForTy public interface OneofOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.OneofOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -38054,13 +38054,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.OneofOptions} */ public static final class OneofOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< OneofOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.OneofOptions) OneofOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use OneofOptions.newBuilder() to construct. - private OneofOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private OneofOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private OneofOptions() { @@ -38080,7 +38080,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_OneofOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -38226,7 +38226,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -38337,20 +38337,20 @@ public static com.google.protobuf.DescriptorProtos.OneofOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.OneofOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.OneofOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.OneofOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -38358,20 +38358,20 @@ public static com.google.protobuf.DescriptorProtos.OneofOptions parseDelimitedFr java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.OneofOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.OneofOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -38391,7 +38391,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -38399,7 +38399,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.OneofOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.OneofOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.OneofOptions) com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder { @@ -38409,7 +38409,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_OneofOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -38422,12 +38422,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -38537,33 +38537,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.OneofOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.OneofOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.OneofOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.OneofOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.OneofOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.OneofOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.OneofOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.OneofOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.OneofOptions) { @@ -38598,7 +38598,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.OneofOptions other uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000002); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -39243,7 +39243,7 @@ public com.google.protobuf.DescriptorProtos.OneofOptions getDefaultInstanceForTy public interface EnumOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.EnumOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -39409,13 +39409,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.EnumOptions} */ public static final class EnumOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< EnumOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumOptions) EnumOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use EnumOptions.newBuilder() to construct. - private EnumOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private EnumOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private EnumOptions() { @@ -39435,7 +39435,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -39684,7 +39684,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -39846,20 +39846,20 @@ public static com.google.protobuf.DescriptorProtos.EnumOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.EnumOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -39867,20 +39867,20 @@ public static com.google.protobuf.DescriptorProtos.EnumOptions parseDelimitedFro java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -39900,7 +39900,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -39908,7 +39908,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.EnumOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumOptions) com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder { @@ -39918,7 +39918,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -39931,12 +39931,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -40061,33 +40061,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.EnumOptions) { @@ -40131,7 +40131,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.EnumOptions other) uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000010); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -41003,7 +41003,7 @@ public com.google.protobuf.DescriptorProtos.EnumOptions getDefaultInstanceForTyp public interface EnumValueOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.EnumValueOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -41165,13 +41165,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.EnumValueOptions} */ public static final class EnumValueOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< EnumValueOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumValueOptions) EnumValueOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use EnumValueOptions.newBuilder() to construct. - private EnumValueOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private EnumValueOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private EnumValueOptions() { @@ -41191,7 +41191,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -41439,7 +41439,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -41600,20 +41600,20 @@ public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -41621,20 +41621,20 @@ public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseDelimit java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.EnumValueOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -41654,7 +41654,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -41662,7 +41662,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumValueOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.EnumValueOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValueOptions) com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder { @@ -41672,7 +41672,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -41685,12 +41685,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getFeatureSupportFieldBuilder(); @@ -41822,33 +41822,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumValueOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumValueOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumValueOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumValueOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumValueOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumValueOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumValueOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.EnumValueOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.EnumValueOptions) { @@ -41892,7 +41892,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.EnumValueOptions o uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000010); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -42843,7 +42843,7 @@ public com.google.protobuf.DescriptorProtos.EnumValueOptions getDefaultInstanceF public interface ServiceOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.ServiceOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -42955,13 +42955,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.ServiceOptions} */ public static final class ServiceOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< ServiceOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.ServiceOptions) ServiceOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use ServiceOptions.newBuilder() to construct. - private ServiceOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private ServiceOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private ServiceOptions() { @@ -42981,7 +42981,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ServiceOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -43160,7 +43160,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000002) != 0)) { @@ -43288,20 +43288,20 @@ public static com.google.protobuf.DescriptorProtos.ServiceOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.ServiceOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ServiceOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ServiceOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -43309,20 +43309,20 @@ public static com.google.protobuf.DescriptorProtos.ServiceOptions parseDelimited java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.ServiceOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.ServiceOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -43342,7 +43342,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -43350,7 +43350,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.ServiceOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.ServiceOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.ServiceOptions) com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder { @@ -43360,7 +43360,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_ServiceOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -43373,12 +43373,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -43493,33 +43493,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ServiceOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ServiceOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ServiceOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.ServiceOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.ServiceOptions) { @@ -43557,7 +43557,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.ServiceOptions oth uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000004); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -44275,7 +44275,7 @@ public com.google.protobuf.DescriptorProtos.ServiceOptions getDefaultInstanceFor public interface MethodOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.MethodOptions) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -44398,13 +44398,13 @@ com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder getUninterpret * Protobuf type {@code google.protobuf.MethodOptions} */ public static final class MethodOptions extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< MethodOptions> implements // @@protoc_insertion_point(message_implements:google.protobuf.MethodOptions) MethodOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use MethodOptions.newBuilder() to construct. - private MethodOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private MethodOptions(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private MethodOptions() { @@ -44425,7 +44425,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MethodOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -44749,7 +44749,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -44892,20 +44892,20 @@ public static com.google.protobuf.DescriptorProtos.MethodOptions parseFrom( } public static com.google.protobuf.DescriptorProtos.MethodOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MethodOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MethodOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -44913,20 +44913,20 @@ public static com.google.protobuf.DescriptorProtos.MethodOptions parseDelimitedF java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.MethodOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.MethodOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -44946,7 +44946,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -44954,7 +44954,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.MethodOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.MethodOptions, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.MethodOptions) com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder { @@ -44964,7 +44964,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_MethodOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -44977,12 +44977,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getUninterpretedOptionFieldBuilder(); @@ -45102,33 +45102,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MethodOptions, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MethodOptions, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MethodOptions, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.MethodOptions, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.MethodOptions) { @@ -45169,7 +45169,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.MethodOptions othe uninterpretedOption_ = other.uninterpretedOption_; bitField0_ = (bitField0_ & ~0x00000008); uninterpretedOptionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getUninterpretedOptionFieldBuilder() : null; } else { uninterpretedOptionBuilder_.addAllMessages(other.uninterpretedOption_); @@ -46073,12 +46073,12 @@ com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder getNa * Protobuf type {@code google.protobuf.UninterpretedOption} */ public static final class UninterpretedOption extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.UninterpretedOption) UninterpretedOptionOrBuilder { private static final long serialVersionUID = 0L; // Use UninterpretedOption.newBuilder() to construct. - private UninterpretedOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UninterpretedOption(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private UninterpretedOption() { @@ -46101,7 +46101,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_UninterpretedOption_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -46152,12 +46152,12 @@ public interface NamePartOrBuilder extends * Protobuf type {@code google.protobuf.UninterpretedOption.NamePart} */ public static final class NamePart extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.UninterpretedOption.NamePart) NamePartOrBuilder { private static final long serialVersionUID = 0L; // Use NamePart.newBuilder() to construct. - private NamePart(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private NamePart(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private NamePart() { @@ -46177,7 +46177,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_UninterpretedOption_NamePart_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -46276,7 +46276,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePart_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, namePart_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(2, isExtension_); @@ -46291,7 +46291,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePart_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, namePart_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -46381,20 +46381,20 @@ public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart } public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -46402,20 +46402,20 @@ public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -46435,7 +46435,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -46451,7 +46451,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.UninterpretedOption.NamePart} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.UninterpretedOption.NamePart) com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -46460,7 +46460,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_UninterpretedOption_NamePart_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -46473,7 +46473,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -47077,7 +47077,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeMessage(2, name_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, identifierValue_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, identifierValue_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(4, positiveIntValue_); @@ -47092,7 +47092,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(7, stringValue_); } if (((bitField0_ & 0x00000020) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, aggregateValue_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 8, aggregateValue_); } getUnknownFields().writeTo(output); } @@ -47108,7 +47108,7 @@ public int getSerializedSize() { .computeMessageSize(2, name_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, identifierValue_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, identifierValue_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -47127,7 +47127,7 @@ public int getSerializedSize() { .computeBytesSize(7, stringValue_); } if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, aggregateValue_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(8, aggregateValue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -47258,20 +47258,20 @@ public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseFrom } public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -47279,20 +47279,20 @@ public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseDeli java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.UninterpretedOption parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -47312,7 +47312,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -47329,7 +47329,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.UninterpretedOption} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.UninterpretedOption) com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -47338,7 +47338,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_UninterpretedOption_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -47351,7 +47351,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -47509,7 +47509,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.UninterpretedOptio name_ = other.name_; bitField0_ = (bitField0_ & ~0x00000001); nameBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getNameFieldBuilder() : null; } else { nameBuilder_.addAllMessages(other.name_); @@ -48284,7 +48284,7 @@ public com.google.protobuf.DescriptorProtos.UninterpretedOption getDefaultInstan public interface FeatureSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.FeatureSet) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -48366,13 +48366,13 @@ public interface FeatureSetOrBuilder extends * Protobuf type {@code google.protobuf.FeatureSet} */ public static final class FeatureSet extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< FeatureSet> implements // @@protoc_insertion_point(message_implements:google.protobuf.FeatureSet) FeatureSetOrBuilder { private static final long serialVersionUID = 0L; // Use FeatureSet.newBuilder() to construct. - private FeatureSet(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private FeatureSet(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private FeatureSet() { @@ -48397,7 +48397,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -49170,7 +49170,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { @@ -49342,20 +49342,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSet parseFrom( } public static com.google.protobuf.DescriptorProtos.FeatureSet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -49363,20 +49363,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSet parseDelimitedFrom java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -49396,7 +49396,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -49413,7 +49413,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FeatureSet} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.FeatureSet, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.FeatureSet) com.google.protobuf.DescriptorProtos.FeatureSetOrBuilder { @@ -49423,7 +49423,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -49436,7 +49436,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -49543,33 +49543,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FeatureSet, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FeatureSet, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FeatureSet, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FeatureSet, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FeatureSet, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FeatureSet, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FeatureSet, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.FeatureSet, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.FeatureSet) { @@ -50115,12 +50115,12 @@ com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault * Protobuf type {@code google.protobuf.FeatureSetDefaults} */ public static final class FeatureSetDefaults extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FeatureSetDefaults) FeatureSetDefaultsOrBuilder { private static final long serialVersionUID = 0L; // Use FeatureSetDefaults.newBuilder() to construct. - private FeatureSetDefaults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureSetDefaults(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FeatureSetDefaults() { @@ -50142,7 +50142,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSetDefaults_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -50229,12 +50229,12 @@ public interface FeatureSetEditionDefaultOrBuilder extends * Protobuf type {@code google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} */ public static final class FeatureSetEditionDefault extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) FeatureSetEditionDefaultOrBuilder { private static final long serialVersionUID = 0L; // Use FeatureSetEditionDefault.newBuilder() to construct. - private FeatureSetEditionDefault(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureSetEditionDefault(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FeatureSetEditionDefault() { @@ -50254,7 +50254,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -50503,20 +50503,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSet } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -50524,20 +50524,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSet java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefault parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -50557,7 +50557,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -50572,7 +50572,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) com.google.protobuf.DescriptorProtos.FeatureSetDefaults.FeatureSetEditionDefaultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -50581,7 +50581,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -50594,12 +50594,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getOverridableFeaturesFieldBuilder(); getFixedFeaturesFieldBuilder(); @@ -51459,20 +51459,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseFrom( } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -51480,20 +51480,20 @@ public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseDelim java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.FeatureSetDefaults parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -51513,7 +51513,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -51528,7 +51528,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FeatureSetDefaults} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FeatureSetDefaults) com.google.protobuf.DescriptorProtos.FeatureSetDefaultsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -51537,7 +51537,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_FeatureSetDefaults_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -51550,7 +51550,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -51688,7 +51688,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.FeatureSetDefaults defaults_ = other.defaults_; bitField0_ = (bitField0_ & ~0x00000001); defaultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getDefaultsFieldBuilder() : null; } else { defaultsBuilder_.addAllMessages(other.defaults_); @@ -52215,7 +52215,7 @@ public com.google.protobuf.DescriptorProtos.FeatureSetDefaults getDefaultInstanc public interface SourceCodeInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.protobuf.SourceCodeInfo) - com.google.protobuf.GeneratedMessageV3. + com.google.protobuf.FlattenedGeneratedMessageV3. ExtendableMessageOrBuilder { /** @@ -52481,13 +52481,13 @@ com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder getLocatio * Protobuf type {@code google.protobuf.SourceCodeInfo} */ public static final class SourceCodeInfo extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableMessage< SourceCodeInfo> implements // @@protoc_insertion_point(message_implements:google.protobuf.SourceCodeInfo) SourceCodeInfoOrBuilder { private static final long serialVersionUID = 0L; // Use SourceCodeInfo.newBuilder() to construct. - private SourceCodeInfo(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private SourceCodeInfo(com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private SourceCodeInfo() { @@ -52507,7 +52507,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_SourceCodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -52867,12 +52867,12 @@ public interface LocationOrBuilder extends * Protobuf type {@code google.protobuf.SourceCodeInfo.Location} */ public static final class Location extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.SourceCodeInfo.Location) LocationOrBuilder { private static final long serialVersionUID = 0L; // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Location(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Location() { @@ -52897,7 +52897,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_SourceCodeInfo_Location_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -53382,13 +53382,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32NoTag(span_.getInt(i)); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, leadingComments_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, leadingComments_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, trailingComments_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 4, trailingComments_); } for (int i = 0; i < leadingDetachedComments_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, leadingDetachedComments_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 6, leadingDetachedComments_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -53428,10 +53428,10 @@ public int getSerializedSize() { spanMemoizedSerializedSize = dataSize; } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, leadingComments_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, leadingComments_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, trailingComments_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(4, trailingComments_); } { int dataSize = 0; @@ -53542,20 +53542,20 @@ public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parse } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -53563,20 +53563,20 @@ public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parse java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -53596,7 +53596,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -53604,7 +53604,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.SourceCodeInfo.Location} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.SourceCodeInfo.Location) com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -53613,7 +53613,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_SourceCodeInfo_Location_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -53626,7 +53626,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -55202,7 +55202,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); for (int i = 0; i < location_.size(); i++) { @@ -55297,20 +55297,20 @@ public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseFrom( } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -55318,20 +55318,20 @@ public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseDelimited java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.SourceCodeInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -55351,7 +55351,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -55364,7 +55364,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.SourceCodeInfo} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + com.google.protobuf.FlattenedGeneratedMessageV3.ExtendableBuilder< com.google.protobuf.DescriptorProtos.SourceCodeInfo, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.SourceCodeInfo) com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder { @@ -55374,7 +55374,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_SourceCodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -55387,7 +55387,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -55482,33 +55482,33 @@ public Builder addRepeatedField( java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.SourceCodeInfo, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.SourceCodeInfo, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.SourceCodeInfo, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.SourceCodeInfo, T> extension) { - return super.clearExtension(extension); - } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.SourceCodeInfo, Type> extension, +// Type value) { +// return super.setExtension(extension, value); +// } +// @java.lang.Override +// public Builder setExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.SourceCodeInfo, java.util.List> extension, +// int index, Type value) { +// return super.setExtension(extension, index, value); +// } +// @java.lang.Override +// public Builder addExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.SourceCodeInfo, java.util.List> extension, +// Type value) { +// return super.addExtension(extension, value); +// } +// @java.lang.Override +// public Builder clearExtension( +// com.google.protobuf.GeneratedMessage.GeneratedExtension< +// com.google.protobuf.DescriptorProtos.SourceCodeInfo, T> extension) { +// return super.clearExtension(extension); +// } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.protobuf.DescriptorProtos.SourceCodeInfo) { @@ -55540,7 +55540,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.SourceCodeInfo oth location_ = other.location_; bitField0_ = (bitField0_ & ~0x00000001); locationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getLocationFieldBuilder() : null; } else { locationBuilder_.addAllMessages(other.location_); @@ -56801,12 +56801,12 @@ com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder getAn * Protobuf type {@code google.protobuf.GeneratedCodeInfo} */ public static final class GeneratedCodeInfo extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.GeneratedCodeInfo) GeneratedCodeInfoOrBuilder { private static final long serialVersionUID = 0L; // Use GeneratedCodeInfo.newBuilder() to construct. - private GeneratedCodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GeneratedCodeInfo(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private GeneratedCodeInfo() { @@ -56826,7 +56826,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_GeneratedCodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -56957,12 +56957,12 @@ public interface AnnotationOrBuilder extends * Protobuf type {@code google.protobuf.GeneratedCodeInfo.Annotation} */ public static final class Annotation extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.GeneratedCodeInfo.Annotation) AnnotationOrBuilder { private static final long serialVersionUID = 0L; // Use Annotation.newBuilder() to construct. - private Annotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Annotation(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Annotation() { @@ -56984,7 +56984,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_GeneratedCodeInfo_Annotation_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -57333,7 +57333,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32NoTag(path_.getInt(i)); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceFile_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, sourceFile_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(3, begin_); @@ -57368,7 +57368,7 @@ public int getSerializedSize() { pathMemoizedSerializedSize = dataSize; } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceFile_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, sourceFile_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -57488,20 +57488,20 @@ public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -57509,20 +57509,20 @@ public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -57542,7 +57542,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -57550,7 +57550,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.GeneratedCodeInfo.Annotation} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.GeneratedCodeInfo.Annotation) com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -57559,7 +57559,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_GeneratedCodeInfo_Annotation_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -57572,7 +57572,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -58416,20 +58416,20 @@ public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseFrom( } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -58437,20 +58437,20 @@ public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseDelimi java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DescriptorProtos.GeneratedCodeInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -58470,7 +58470,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -58484,7 +58484,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.GeneratedCodeInfo} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.GeneratedCodeInfo) com.google.protobuf.DescriptorProtos.GeneratedCodeInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -58493,7 +58493,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DescriptorProtos.internal_static_google_protobuf_GeneratedCodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -58506,7 +58506,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -58632,7 +58632,7 @@ public Builder mergeFrom(com.google.protobuf.DescriptorProtos.GeneratedCodeInfo annotation_ = other.annotation_; bitField0_ = (bitField0_ & ~0x00000001); annotationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getAnnotationFieldBuilder() : null; } else { annotationBuilder_.addAllMessages(other.annotation_); @@ -59091,167 +59091,167 @@ public com.google.protobuf.DescriptorProtos.GeneratedCodeInfo getDefaultInstance private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FileDescriptorSet_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FileDescriptorSet_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FileDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_DescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_DescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_DescriptorProto_ReservedRange_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_DescriptorProto_ReservedRange_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_ExtensionRangeOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_ExtensionRangeOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_ExtensionRangeOptions_Declaration_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_ExtensionRangeOptions_Declaration_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FieldDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_OneofDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_OneofDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumValueDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_ServiceDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_MethodDescriptorProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FileOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FileOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_MessageOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_MessageOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FieldOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FieldOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FieldOptions_EditionDefault_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FieldOptions_EditionDefault_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FieldOptions_FeatureSupport_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FieldOptions_FeatureSupport_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_OneofOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_OneofOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumValueOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_ServiceOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_ServiceOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_MethodOptions_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_MethodOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_UninterpretedOption_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_UninterpretedOption_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_UninterpretedOption_NamePart_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_UninterpretedOption_NamePart_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FeatureSet_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FeatureSet_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FeatureSetDefaults_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FeatureSetDefaults_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_SourceCodeInfo_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_SourceCodeInfo_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_SourceCodeInfo_Location_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_SourceCodeInfo_Location_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_GeneratedCodeInfo_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_GeneratedCodeInfo_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_GeneratedCodeInfo_Annotation_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_GeneratedCodeInfo_Annotation_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -59523,199 +59523,199 @@ public com.google.protobuf.DescriptorProtos.GeneratedCodeInfo getDefaultInstance internal_static_google_protobuf_FileDescriptorSet_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_FileDescriptorSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FileDescriptorSet_descriptor, new java.lang.String[] { "File", }); internal_static_google_protobuf_FileDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FileDescriptorProto_descriptor, new java.lang.String[] { "Name", "Package", "Dependency", "PublicDependency", "WeakDependency", "MessageType", "EnumType", "Service", "Extension", "Options", "SourceCodeInfo", "Syntax", "Edition", }); internal_static_google_protobuf_DescriptorProto_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_protobuf_DescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_DescriptorProto_descriptor, new java.lang.String[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", "ReservedRange", "ReservedName", }); internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor = internal_static_google_protobuf_DescriptorProto_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor, new java.lang.String[] { "Start", "End", "Options", }); internal_static_google_protobuf_DescriptorProto_ReservedRange_descriptor = internal_static_google_protobuf_DescriptorProto_descriptor.getNestedTypes().get(1); internal_static_google_protobuf_DescriptorProto_ReservedRange_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_DescriptorProto_ReservedRange_descriptor, new java.lang.String[] { "Start", "End", }); internal_static_google_protobuf_ExtensionRangeOptions_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_protobuf_ExtensionRangeOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_ExtensionRangeOptions_descriptor, new java.lang.String[] { "UninterpretedOption", "Declaration", "Features", "Verification", }); internal_static_google_protobuf_ExtensionRangeOptions_Declaration_descriptor = internal_static_google_protobuf_ExtensionRangeOptions_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_ExtensionRangeOptions_Declaration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_ExtensionRangeOptions_Declaration_descriptor, new java.lang.String[] { "Number", "FullName", "Type", "Reserved", "Repeated", }); internal_static_google_protobuf_FieldDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FieldDescriptorProto_descriptor, new java.lang.String[] { "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "OneofIndex", "JsonName", "Options", "Proto3Optional", }); internal_static_google_protobuf_OneofDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_google_protobuf_OneofDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_OneofDescriptorProto_descriptor, new java.lang.String[] { "Name", "Options", }); internal_static_google_protobuf_EnumDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumDescriptorProto_descriptor, new java.lang.String[] { "Name", "Value", "Options", "ReservedRange", "ReservedName", }); internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_descriptor = internal_static_google_protobuf_EnumDescriptorProto_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumDescriptorProto_EnumReservedRange_descriptor, new java.lang.String[] { "Start", "End", }); internal_static_google_protobuf_EnumValueDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumValueDescriptorProto_descriptor, new java.lang.String[] { "Name", "Number", "Options", }); internal_static_google_protobuf_ServiceDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_ServiceDescriptorProto_descriptor, new java.lang.String[] { "Name", "Method", "Options", }); internal_static_google_protobuf_MethodDescriptorProto_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_MethodDescriptorProto_descriptor, new java.lang.String[] { "Name", "InputType", "OutputType", "Options", "ClientStreaming", "ServerStreaming", }); internal_static_google_protobuf_FileOptions_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_google_protobuf_FileOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FileOptions_descriptor, new java.lang.String[] { "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "Deprecated", "CcEnableArenas", "ObjcClassPrefix", "CsharpNamespace", "SwiftPrefix", "PhpClassPrefix", "PhpNamespace", "PhpMetadataNamespace", "RubyPackage", "Features", "UninterpretedOption", }); internal_static_google_protobuf_MessageOptions_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_google_protobuf_MessageOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_MessageOptions_descriptor, new java.lang.String[] { "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEntry", "DeprecatedLegacyJsonFieldConflicts", "Features", "UninterpretedOption", }); internal_static_google_protobuf_FieldOptions_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_google_protobuf_FieldOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FieldOptions_descriptor, new java.lang.String[] { "Ctype", "Packed", "Jstype", "Lazy", "UnverifiedLazy", "Deprecated", "Weak", "DebugRedact", "Retention", "Targets", "EditionDefaults", "Features", "FeatureSupport", "UninterpretedOption", }); internal_static_google_protobuf_FieldOptions_EditionDefault_descriptor = internal_static_google_protobuf_FieldOptions_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_FieldOptions_EditionDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FieldOptions_EditionDefault_descriptor, new java.lang.String[] { "Edition", "Value", }); internal_static_google_protobuf_FieldOptions_FeatureSupport_descriptor = internal_static_google_protobuf_FieldOptions_descriptor.getNestedTypes().get(1); internal_static_google_protobuf_FieldOptions_FeatureSupport_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FieldOptions_FeatureSupport_descriptor, new java.lang.String[] { "EditionIntroduced", "EditionDeprecated", "DeprecationWarning", "EditionRemoved", }); internal_static_google_protobuf_OneofOptions_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_google_protobuf_OneofOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_OneofOptions_descriptor, new java.lang.String[] { "Features", "UninterpretedOption", }); internal_static_google_protobuf_EnumOptions_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_google_protobuf_EnumOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumOptions_descriptor, new java.lang.String[] { "AllowAlias", "Deprecated", "DeprecatedLegacyJsonFieldConflicts", "Features", "UninterpretedOption", }); internal_static_google_protobuf_EnumValueOptions_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumValueOptions_descriptor, new java.lang.String[] { "Deprecated", "Features", "DebugRedact", "FeatureSupport", "UninterpretedOption", }); internal_static_google_protobuf_ServiceOptions_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_google_protobuf_ServiceOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_ServiceOptions_descriptor, new java.lang.String[] { "Features", "Deprecated", "UninterpretedOption", }); internal_static_google_protobuf_MethodOptions_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_google_protobuf_MethodOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_MethodOptions_descriptor, new java.lang.String[] { "Deprecated", "IdempotencyLevel", "Features", "UninterpretedOption", }); internal_static_google_protobuf_UninterpretedOption_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_google_protobuf_UninterpretedOption_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_UninterpretedOption_descriptor, new java.lang.String[] { "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue", }); internal_static_google_protobuf_UninterpretedOption_NamePart_descriptor = internal_static_google_protobuf_UninterpretedOption_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_UninterpretedOption_NamePart_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_UninterpretedOption_NamePart_descriptor, new java.lang.String[] { "NamePart", "IsExtension", }); internal_static_google_protobuf_FeatureSet_descriptor = getDescriptor().getMessageTypes().get(19); internal_static_google_protobuf_FeatureSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FeatureSet_descriptor, new java.lang.String[] { "FieldPresence", "EnumType", "RepeatedFieldEncoding", "Utf8Validation", "MessageEncoding", "JsonFormat", }); internal_static_google_protobuf_FeatureSetDefaults_descriptor = getDescriptor().getMessageTypes().get(20); internal_static_google_protobuf_FeatureSetDefaults_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FeatureSetDefaults_descriptor, new java.lang.String[] { "Defaults", "MinimumEdition", "MaximumEdition", }); internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_descriptor = internal_static_google_protobuf_FeatureSetDefaults_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault_descriptor, new java.lang.String[] { "Edition", "OverridableFeatures", "FixedFeatures", }); internal_static_google_protobuf_SourceCodeInfo_descriptor = getDescriptor().getMessageTypes().get(21); internal_static_google_protobuf_SourceCodeInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_SourceCodeInfo_descriptor, new java.lang.String[] { "Location", }); internal_static_google_protobuf_SourceCodeInfo_Location_descriptor = internal_static_google_protobuf_SourceCodeInfo_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_SourceCodeInfo_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_SourceCodeInfo_Location_descriptor, new java.lang.String[] { "Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments", }); internal_static_google_protobuf_GeneratedCodeInfo_descriptor = getDescriptor().getMessageTypes().get(22); internal_static_google_protobuf_GeneratedCodeInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_GeneratedCodeInfo_descriptor, new java.lang.String[] { "Annotation", }); internal_static_google_protobuf_GeneratedCodeInfo_Annotation_descriptor = internal_static_google_protobuf_GeneratedCodeInfo_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_GeneratedCodeInfo_Annotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_GeneratedCodeInfo_Annotation_descriptor, new java.lang.String[] { "Path", "SourceFile", "Begin", "End", "Semantic", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/DoubleValue.java b/protobuf-api/src/main/java/com/google/protobuf/DoubleValue.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/DoubleValue.java rename to protobuf-api/src/main/java/com/google/protobuf/DoubleValue.java index 974047a..9a0b11f 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/DoubleValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/DoubleValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.DoubleValue} */ public final class DoubleValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.DoubleValue) DoubleValueOrBuilder { private static final long serialVersionUID = 0L; // Use DoubleValue.newBuilder() to construct. - private DoubleValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DoubleValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private DoubleValue() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -161,20 +161,20 @@ public static com.google.protobuf.DoubleValue parseFrom( } public static com.google.protobuf.DoubleValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DoubleValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DoubleValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -182,20 +182,20 @@ public static com.google.protobuf.DoubleValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.DoubleValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.DoubleValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -215,7 +215,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -229,7 +229,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.DoubleValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.DoubleValue) com.google.protobuf.DoubleValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -238,7 +238,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_DoubleValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -251,7 +251,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/DoubleValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Duration.java b/protobuf-api/src/main/java/com/google/protobuf/Duration.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Duration.java rename to protobuf-api/src/main/java/com/google/protobuf/Duration.java index b0679c0..361ee3d 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Duration.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Duration.java @@ -69,12 +69,12 @@ * Protobuf type {@code google.protobuf.Duration} */ public final class Duration extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Duration) DurationOrBuilder { private static final long serialVersionUID = 0L; // Use Duration.newBuilder() to construct. - private Duration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Duration(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Duration() { @@ -93,7 +93,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -248,20 +248,20 @@ public static com.google.protobuf.Duration parseFrom( } public static com.google.protobuf.Duration parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Duration parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Duration parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -269,20 +269,20 @@ public static com.google.protobuf.Duration parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Duration parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Duration parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -302,7 +302,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -371,7 +371,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Duration} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Duration) com.google.protobuf.DurationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -380,7 +380,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.DurationProto.internal_static_google_protobuf_Duration_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -393,7 +393,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/DurationOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/DurationOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/DurationOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/DurationOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/DurationProto.java b/protobuf-api/src/main/java/com/google/protobuf/DurationProto.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/DurationProto.java rename to protobuf-api/src/main/java/com/google/protobuf/DurationProto.java index cd13d21..275746b 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/DurationProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/DurationProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Duration_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Duration_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -43,7 +43,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_Duration_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Duration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Duration_descriptor, new java.lang.String[] { "Seconds", "Nanos", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Empty.java b/protobuf-api/src/main/java/com/google/protobuf/Empty.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/Empty.java rename to protobuf-api/src/main/java/com/google/protobuf/Empty.java index 04437a3..38426dc 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Empty.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Empty.java @@ -18,12 +18,12 @@ * Protobuf type {@code google.protobuf.Empty} */ public final class Empty extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Empty) EmptyOrBuilder { private static final long serialVersionUID = 0L; // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Empty(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Empty() { @@ -42,7 +42,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -137,20 +137,20 @@ public static com.google.protobuf.Empty parseFrom( } public static com.google.protobuf.Empty parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Empty parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -158,20 +158,20 @@ public static com.google.protobuf.Empty parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Empty parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Empty parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -191,7 +191,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -209,7 +209,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Empty} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Empty) com.google.protobuf.EmptyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -218,7 +218,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -231,7 +231,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/EmptyOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/EmptyOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/EmptyOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/EmptyOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/EmptyProto.java b/protobuf-api/src/main/java/com/google/protobuf/EmptyProto.java similarity index 92% rename from protobuf-sdk/src/main/java/com/google/protobuf/EmptyProto.java rename to protobuf-api/src/main/java/com/google/protobuf/EmptyProto.java index 666acb2..dd55151 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/EmptyProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/EmptyProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Empty_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Empty_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -42,7 +42,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Empty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Empty_descriptor, new java.lang.String[] { }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Enum.java b/protobuf-api/src/main/java/com/google/protobuf/Enum.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Enum.java rename to protobuf-api/src/main/java/com/google/protobuf/Enum.java index 17f3bf8..683b733 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Enum.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Enum.java @@ -12,12 +12,12 @@ * Protobuf type {@code google.protobuf.Enum} */ public final class Enum extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Enum) EnumOrBuilder { private static final long serialVersionUID = 0L; // Use Enum.newBuilder() to construct. - private Enum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Enum(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Enum() { @@ -41,7 +41,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -343,8 +343,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < enumvalue_.size(); i++) { output.writeMessage(2, enumvalue_.get(i)); @@ -358,8 +358,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { output.writeEnum(5, syntax_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, edition_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(edition_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 6, edition_); } getUnknownFields().writeTo(output); } @@ -370,8 +370,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < enumvalue_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -389,8 +389,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, syntax_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, edition_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(edition_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(6, edition_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -489,20 +489,20 @@ public static com.google.protobuf.Enum parseFrom( } public static com.google.protobuf.Enum parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Enum parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Enum parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -510,20 +510,20 @@ public static com.google.protobuf.Enum parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Enum parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Enum parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -543,7 +543,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -555,7 +555,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Enum} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Enum) com.google.protobuf.EnumOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -564,7 +564,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Enum_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -577,12 +577,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getEnumvalueFieldBuilder(); getOptionsFieldBuilder(); @@ -757,7 +757,7 @@ public Builder mergeFrom(com.google.protobuf.Enum other) { enumvalue_ = other.enumvalue_; bitField0_ = (bitField0_ & ~0x00000002); enumvalueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getEnumvalueFieldBuilder() : null; } else { enumvalueBuilder_.addAllMessages(other.enumvalue_); @@ -783,7 +783,7 @@ public Builder mergeFrom(com.google.protobuf.Enum other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000004); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/EnumOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/EnumOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/EnumOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/EnumOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/EnumValue.java b/protobuf-api/src/main/java/com/google/protobuf/EnumValue.java similarity index 95% rename from protobuf-sdk/src/main/java/com/google/protobuf/EnumValue.java rename to protobuf-api/src/main/java/com/google/protobuf/EnumValue.java index 62634f4..8d928d6 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/EnumValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/EnumValue.java @@ -12,12 +12,12 @@ * Protobuf type {@code google.protobuf.EnumValue} */ public final class EnumValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumValue) EnumValueOrBuilder { private static final long serialVersionUID = 0L; // Use EnumValue.newBuilder() to construct. - private EnumValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EnumValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private EnumValue() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -182,8 +182,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (number_ != 0) { output.writeInt32(2, number_); @@ -200,8 +200,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (number_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -290,20 +290,20 @@ public static com.google.protobuf.EnumValue parseFrom( } public static com.google.protobuf.EnumValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.EnumValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.EnumValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -311,20 +311,20 @@ public static com.google.protobuf.EnumValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -344,7 +344,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -356,7 +356,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.EnumValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValue) com.google.protobuf.EnumValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -365,7 +365,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_EnumValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -378,7 +378,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -520,7 +520,7 @@ public Builder mergeFrom(com.google.protobuf.EnumValue other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000004); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/EnumValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/EnumValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/EnumValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/EnumValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Field.java b/protobuf-api/src/main/java/com/google/protobuf/Field.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Field.java rename to protobuf-api/src/main/java/com/google/protobuf/Field.java index 0cd180b..0ca9ed0 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Field.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Field.java @@ -12,12 +12,12 @@ * Protobuf type {@code google.protobuf.Field} */ public final class Field extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Field) FieldOrBuilder { private static final long serialVersionUID = 0L; // Use Field.newBuilder() to construct. - private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Field(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Field() { @@ -43,7 +43,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1001,11 +1001,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (number_ != 0) { output.writeInt32(3, number_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 4, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, typeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(typeUrl_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 6, typeUrl_); } if (oneofIndex_ != 0) { output.writeInt32(7, oneofIndex_); @@ -1016,11 +1016,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < options_.size(); i++) { output.writeMessage(9, options_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jsonName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, jsonName_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(jsonName_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 10, jsonName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, defaultValue_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(defaultValue_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 11, defaultValue_); } getUnknownFields().writeTo(output); } @@ -1043,11 +1043,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, number_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(4, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, typeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(typeUrl_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(6, typeUrl_); } if (oneofIndex_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -1061,11 +1061,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, options_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jsonName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, jsonName_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(jsonName_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(10, jsonName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, defaultValue_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(defaultValue_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(11, defaultValue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1173,20 +1173,20 @@ public static com.google.protobuf.Field parseFrom( } public static com.google.protobuf.Field parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Field parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Field parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -1194,20 +1194,20 @@ public static com.google.protobuf.Field parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Field parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Field parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1227,7 +1227,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1239,7 +1239,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Field} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Field) com.google.protobuf.FieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1248,7 +1248,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1261,7 +1261,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -1448,7 +1448,7 @@ public Builder mergeFrom(com.google.protobuf.Field other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000080); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FieldMask.java b/protobuf-api/src/main/java/com/google/protobuf/FieldMask.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/FieldMask.java rename to protobuf-api/src/main/java/com/google/protobuf/FieldMask.java index 5aab429..c5fa321 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/FieldMask.java +++ b/protobuf-api/src/main/java/com/google/protobuf/FieldMask.java @@ -210,12 +210,12 @@ * Protobuf type {@code google.protobuf.FieldMask} */ public final class FieldMask extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FieldMask) FieldMaskOrBuilder { private static final long serialVersionUID = 0L; // Use FieldMask.newBuilder() to construct. - private FieldMask(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FieldMask(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FieldMask() { @@ -236,7 +236,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -311,7 +311,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < paths_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, paths_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, paths_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -401,20 +401,20 @@ public static com.google.protobuf.FieldMask parseFrom( } public static com.google.protobuf.FieldMask parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.FieldMask parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.FieldMask parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -422,20 +422,20 @@ public static com.google.protobuf.FieldMask parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.FieldMask parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.FieldMask parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -455,7 +455,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -665,7 +665,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FieldMask} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FieldMask) com.google.protobuf.FieldMaskOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -674,7 +674,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.FieldMaskProto.internal_static_google_protobuf_FieldMask_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -687,7 +687,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/FieldMaskOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FieldMaskProto.java b/protobuf-api/src/main/java/com/google/protobuf/FieldMaskProto.java similarity index 92% rename from protobuf-sdk/src/main/java/com/google/protobuf/FieldMaskProto.java rename to protobuf-api/src/main/java/com/google/protobuf/FieldMaskProto.java index cfc5499..39d49ab 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/FieldMaskProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/FieldMaskProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FieldMask_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FieldMask_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -43,7 +43,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_FieldMask_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_FieldMask_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FieldMask_descriptor, new java.lang.String[] { "Paths", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FieldOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/FieldOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/FieldOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/FieldOrBuilder.java diff --git a/protobuf-api/src/main/java/com/google/protobuf/FlattenedAbstractMessage.java b/protobuf-api/src/main/java/com/google/protobuf/FlattenedAbstractMessage.java new file mode 100644 index 0000000..68d8da9 --- /dev/null +++ b/protobuf-api/src/main/java/com/google/protobuf/FlattenedAbstractMessage.java @@ -0,0 +1,864 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. 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 +// https://developers.google.com/open-source/licenses/bsd + +package com.google.protobuf; + +import com.google.protobuf.Descriptors.EnumValueDescriptor; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Descriptors.OneofDescriptor; +import com.google.protobuf.Internal.EnumLite; + +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import static com.google.protobuf.Internal.checkNotNull; + +/** + * A partial implementation of the {@link Message} interface which implements as many methods of + * that interface as possible in terms of other methods. + * + * @author kenton@google.com Kenton Varda + */ +public abstract class FlattenedAbstractMessage + // TODO: Update GeneratedMessage to parameterize with MessageType and BuilderType. + implements Message { + + protected int memoizedHashCode = 0; + + @Override + public ByteString toByteString() { + try { + final ByteString.CodedBuilder out = ByteString.newCodedBuilder(getSerializedSize()); + writeTo(out.getCodedOutput()); + return out.build(); + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("ByteString"), e); + } + } + + @Override + public byte[] toByteArray() { + try { + final byte[] result = new byte[getSerializedSize()]; + final CodedOutputStream output = CodedOutputStream.newInstance(result); + writeTo(output); + output.checkNoSpaceLeft(); + return result; + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("byte array"), e); + } + } + + @Override + public void writeTo(final OutputStream output) throws IOException { + final int bufferSize = CodedOutputStream.computePreferredBufferSize(getSerializedSize()); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + writeTo(codedOutput); + codedOutput.flush(); + } + + @Override + public void writeDelimitedTo(final OutputStream output) throws IOException { + final int serialized = getSerializedSize(); + final int bufferSize = + CodedOutputStream.computePreferredBufferSize( + CodedOutputStream.computeUInt32SizeNoTag(serialized) + serialized); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + codedOutput.writeUInt32NoTag(serialized); + writeTo(codedOutput); + codedOutput.flush(); + } + + int getSerializedSize( + Schema schema) { + int memoizedSerializedSize = getMemoizedSerializedSize(); + if (memoizedSerializedSize == -1) { + memoizedSerializedSize = schema.getSerializedSize(this); + setMemoizedSerializedSize(memoizedSerializedSize); + } + return memoizedSerializedSize; + } + + private String getSerializingExceptionMessage(String target) { + return "Serializing " + + getClass().getName() + + " to a " + + target + + " threw an IOException (should never happen)."; + } + + protected static void checkByteStringIsUtf8(ByteString byteString) + throws IllegalArgumentException { + if (!byteString.isValidUtf8()) { + throw new IllegalArgumentException("Byte string is not UTF-8."); + } + } + + /** Interface for an enum which signifies which field in a {@code oneof} was specified. */ + protected interface InternalOneOfEnum { + /** + * Retrieves the field number of the field which was set in this {@code oneof}, or {@code 0} if + * none were. + */ + int getNumber(); + } + + @Override + public boolean isInitialized() { + return MessageReflection.isInitialized(this); + } + + /** + * Interface for the parent of a Builder that allows the builder to communicate invalidations back + * to the parent for use when using nested builders. + */ + protected interface BuilderParent { + + /** + * A builder becomes dirty whenever a field is modified -- including fields in nested builders + * -- and becomes clean when build() is called. Thus, when a builder becomes dirty, all its + * parents become dirty as well, and when it becomes clean, all its children become clean. The + * dirtiness state is used to invalidate certain cached values. + * + *

To this end, a builder calls markDirty() on its parent whenever it transitions from clean + * to dirty. The parent must propagate this call to its own parent, unless it was already dirty, + * in which case the grandparent must necessarily already be dirty as well. The parent can only + * transition back to "clean" after calling build() on all children. + */ + void markDirty(); + } + + /** Create a nested builder. */ + protected Message.Builder newBuilderForType(BuilderParent parent) { + throw new UnsupportedOperationException("Nested builder is not supported for this type."); + } + + @Override + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + @Override + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + // TODO: Clear it when all subclasses have implemented this method. + @Override + public boolean hasOneof(OneofDescriptor oneof) { + throw new UnsupportedOperationException("hasOneof() is not implemented."); + } + + // TODO: Clear it when all subclasses have implemented this method. + @Override + public FieldDescriptor getOneofFieldDescriptor(OneofDescriptor oneof) { + throw new UnsupportedOperationException("getOneofFieldDescriptor() is not implemented."); + } + + @Override + public final String toString() { + return TextFormat.printer().printToString(this); + } + + @Override + public void writeTo(final CodedOutputStream output) throws IOException { + MessageReflection.writeMessageTo(this, getAllFields(), output, false); + } + + protected int memoizedSize = -1; + + int getMemoizedSerializedSize() { + return memoizedSize; + } + + void setMemoizedSerializedSize(int size) { + memoizedSize = size; + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) { + return size; + } + + memoizedSize = MessageReflection.getSerializedSize(this, getAllFields()); + return memoizedSize; + } + + @Override + public boolean equals(final Object other) { + if (other == this) { + return true; + } + if (!(other instanceof Message)) { + return false; + } + final Message otherMessage = (Message) other; + if (getDescriptorForType() != otherMessage.getDescriptorForType()) { + return false; + } + return compareFields(getAllFields(), otherMessage.getAllFields()) + && getUnknownFields().equals(otherMessage.getUnknownFields()); + } + + @Override + public int hashCode() { + int hash = memoizedHashCode; + if (hash == 0) { + hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = hashFields(hash, getAllFields()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + } + return hash; + } + + private static ByteString toByteString(Object value) { + if (value instanceof byte[]) { + return ByteString.copyFrom((byte[]) value); + } else { + return (ByteString) value; + } + } + + /** + * Compares two bytes fields. The parameters must be either a byte array or a ByteString object. + * They can be of different type though. + */ + private static boolean compareBytes(Object a, Object b) { + if (a instanceof byte[] && b instanceof byte[]) { + return Arrays.equals((byte[]) a, (byte[]) b); + } + return toByteString(a).equals(toByteString(b)); + } + + /** Converts a list of MapEntry messages into a Map used for equals() and hashCode(). */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Map convertMapEntryListToMap(List list) { + if (list.isEmpty()) { + return Collections.emptyMap(); + } + Map result = new HashMap<>(); + Iterator iterator = list.iterator(); + Message entry = (Message) iterator.next(); + Descriptors.Descriptor descriptor = entry.getDescriptorForType(); + FieldDescriptor key = descriptor.findFieldByName("key"); + FieldDescriptor value = descriptor.findFieldByName("value"); + Object fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + while (iterator.hasNext()) { + entry = (Message) iterator.next(); + fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + } + return result; + } + + /** Compares two map fields. The parameters must be a list of MapEntry messages. */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static boolean compareMapField(Object a, Object b) { + Map ma = convertMapEntryListToMap((List) a); + Map mb = convertMapEntryListToMap((List) b); + return MapFieldLite.equals(ma, mb); + } + + /** + * Compares two sets of fields. This method is used to implement {@link + * FlattenedAbstractMessage#equals(Object)} and {@link AbstractMutableMessage#equals(Object)}. It takes + * special care of bytes fields because immutable messages and mutable messages use different Java + * type to represent a bytes field and this method should be able to compare immutable messages, + * mutable messages and also an immutable message to a mutable message. + */ + static boolean compareFields(Map a, Map b) { + if (a.size() != b.size()) { + return false; + } + for (FieldDescriptor descriptor : a.keySet()) { + if (!b.containsKey(descriptor)) { + return false; + } + Object value1 = a.get(descriptor); + Object value2 = b.get(descriptor); + if (descriptor.getType() == FieldDescriptor.Type.BYTES) { + if (descriptor.isRepeated()) { + List list1 = (List) value1; + List list2 = (List) value2; + if (list1.size() != list2.size()) { + return false; + } + for (int i = 0; i < list1.size(); i++) { + if (!compareBytes(list1.get(i), list2.get(i))) { + return false; + } + } + } else { + // Compares a singular bytes field. + if (!compareBytes(value1, value2)) { + return false; + } + } + } else if (descriptor.isMapField()) { + if (!compareMapField(value1, value2)) { + return false; + } + } else { + // Compare non-bytes fields. + if (!value1.equals(value2)) { + return false; + } + } + } + return true; + } + + /** Calculates the hash code of a map field. {@code value} must be a list of MapEntry messages. */ + @SuppressWarnings("unchecked") + private static int hashMapField(Object value) { + return MapFieldLite.calculateHashCodeForMap(convertMapEntryListToMap((List) value)); + } + + /** Get a hash code for given fields and values, using the given seed. */ + @SuppressWarnings("unchecked") + protected static int hashFields(int hash, Map map) { + for (Map.Entry entry : map.entrySet()) { + FieldDescriptor field = entry.getKey(); + Object value = entry.getValue(); + hash = (37 * hash) + field.getNumber(); + if (field.isMapField()) { + hash = (53 * hash) + hashMapField(value); + } else if (field.getType() != FieldDescriptor.Type.ENUM) { + hash = (53 * hash) + value.hashCode(); + } else if (field.isRepeated()) { + List list = (List) value; + hash = (53 * hash) + Internal.hashEnumList(list); + } else { + hash = (53 * hash) + Internal.hashEnum((EnumLite) value); + } + } + return hash; + } + + /** + * Package private helper method for AbstractParser to create UninitializedMessageException with + * missing field information. + */ + UninitializedMessageException newUninitializedMessageException() { + return Builder.newUninitializedMessageException(this); + } + + // ================================================================= + + /** + * A partial implementation of the {@link Message.Builder} interface which implements as many + * methods of that interface as possible in terms of other methods. + */ + @SuppressWarnings("unchecked") + public abstract static class Builder> implements Message.Builder { + + /** + * An InputStream implementations which reads from some other InputStream but is limited to a + * particular number of bytes. Used by mergeDelimitedFrom(). This is intentionally + * package-private so that UnknownFieldSet can share it. + */ + static final class LimitedInputStream extends FilterInputStream { + private int limit; + + LimitedInputStream(InputStream in, int limit) { + super(in); + this.limit = limit; + } + + @Override + public int available() throws IOException { + return Math.min(super.available(), limit); + } + + @Override + public int read() throws IOException { + if (limit <= 0) { + return -1; + } + final int result = super.read(); + if (result >= 0) { + --limit; + } + return result; + } + + @Override + public int read(final byte[] b, final int off, int len) throws IOException { + if (limit <= 0) { + return -1; + } + len = Math.min(len, limit); + final int result = super.read(b, off, len); + if (result >= 0) { + limit -= result; + } + return result; + } + + @Override + public long skip(final long n) throws IOException { + // because we take the minimum of an int and a long, result is guaranteed to be + // less than or equal to Integer.MAX_INT so this cast is safe + int result = (int) super.skip(Math.min(n, limit)); + if (result >= 0) { + // if the superclass adheres to the contract for skip, this condition is always true + limit -= result; + } + return result; + } + } + + @Override + public boolean mergeDelimitedFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final int firstByte = input.read(); + if (firstByte == -1) { + return false; + } + final int size = CodedInputStream.readRawVarint32(firstByte, input); + final InputStream limitedInput = new AbstractMessageLite.Builder.LimitedInputStream(input, size); + mergeFrom(limitedInput, extensionRegistry); + return true; + } + + @Override + public boolean mergeDelimitedFrom(final InputStream input) throws IOException { + return mergeDelimitedFrom(input, ExtensionRegistryLite.getEmptyRegistry()); + } + + @Override + @SuppressWarnings("unchecked") // isInstance takes care of this + public BuilderType mergeFrom(final MessageLite other) { + if (!getDefaultInstanceForType().getClass().isInstance(other)) { + throw new IllegalArgumentException( + "mergeFrom(MessageLite) can only merge messages of the same type."); + } + + return internalMergeFrom(other); + } + + private String getReadingExceptionMessage(String target) { + return "Reading " + + getClass().getName() + + " from a " + + target + + " threw an IOException (should never happen)."; + } + + // We check nulls as we iterate to avoid iterating over values twice. + private static void addAllCheckingNulls(Iterable values, List list) { + if (list instanceof ArrayList && values instanceof Collection) { + ((ArrayList) list).ensureCapacity(list.size() + ((Collection) values).size()); + } + int begin = list.size(); + for (T value : values) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (list.size() - begin) + " is null."; + for (int i = list.size() - 1; i >= begin; i--) { + list.remove(i); + } + throw new NullPointerException(message); + } + list.add(value); + } + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + MessageLite message) { + return new UninitializedMessageException(message); + } + + // For binary compatibility. + @Deprecated + protected static void addAll(final Iterable values, final Collection list) { + addAll(values, (List) list); + } + + /** + * Adds the {@code values} to the {@code list}. This is a helper method used by generated code. + * Users should ignore it. + * + * @throws NullPointerException if {@code values} or any of the elements of {@code values} is + * null. + */ + protected static void addAll(final Iterable values, final List list) { + checkNotNull(values); + if (values instanceof LazyStringList) { + // For StringOrByteStringLists, check the underlying elements to avoid + // forcing conversions of ByteStrings to Strings. + // TODO: Could we just prohibit nulls in all protobuf lists and get rid of this? Is + // if even possible to hit this condition as all protobuf methods check for null first, + // right? + List lazyValues = ((LazyStringList) values).getUnderlyingElements(); + LazyStringList lazyList = (LazyStringList) list; + int begin = list.size(); + for (Object value : lazyValues) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (lazyList.size() - begin) + " is null."; + for (int i = lazyList.size() - 1; i >= begin; i--) { + lazyList.remove(i); + } + throw new NullPointerException(message); + } + if (value instanceof ByteString) { + lazyList.add((ByteString) value); + } else { + lazyList.add((String) value); + } + } + } else { + if (values instanceof PrimitiveNonBoxingCollection) { + list.addAll((Collection) values); + } else { + addAllCheckingNulls(values, list); + } + } + } + + // The compiler produces an error if this is not declared explicitly. + // Method isn't abstract to bypass Java 1.6 compiler issue: + // http://bugs.java.com/view_bug.do?bug_id=6908259 + @Override + public BuilderType clone() { + throw new UnsupportedOperationException("clone() should be implemented in subclasses."); + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public boolean hasOneof(OneofDescriptor oneof) { + throw new UnsupportedOperationException("hasOneof() is not implemented."); + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public FieldDescriptor getOneofFieldDescriptor(OneofDescriptor oneof) { + throw new UnsupportedOperationException("getOneofFieldDescriptor() is not implemented."); + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public BuilderType clearOneof(OneofDescriptor oneof) { + throw new UnsupportedOperationException("clearOneof() is not implemented."); + } + + @Override + public BuilderType clear() { + for (final Map.Entry entry : getAllFields().entrySet()) { + clearField(entry.getKey()); + } + return (BuilderType) this; + } + + @Override + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + @Override + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + protected BuilderType internalMergeFrom(MessageLite other) { + return mergeFrom((Message) other); + } + + @Override + public BuilderType mergeFrom(final Message other) { + return mergeFrom(other, other.getAllFields()); + } + + BuilderType mergeFrom(final Message other, Map allFields) { + if (other.getDescriptorForType() != getDescriptorForType()) { + throw new IllegalArgumentException( + "mergeFrom(Message) can only merge messages of the same type."); + } + + // Note: We don't attempt to verify that other's fields have valid + // types. Doing so would be a losing battle. We'd have to verify + // all sub-messages as well, and we'd have to make copies of all of + // them to insure that they don't change after verification (since + // the Message interface itself cannot enforce immutability of + // implementations). + + for (final Map.Entry entry : allFields.entrySet()) { + final FieldDescriptor field = entry.getKey(); + if (field.isRepeated()) { + for (final Object element : (List) entry.getValue()) { + addRepeatedField(field, element); + } + } else if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + final Message existingValue = (Message) getField(field); + if (existingValue == existingValue.getDefaultInstanceForType()) { + setField(field, entry.getValue()); + } else { + setField( + field, + existingValue + .newBuilderForType() + .mergeFrom(existingValue) + .mergeFrom((Message) entry.getValue()) + .build()); + } + } else { + setField(field, entry.getValue()); + } + } + + mergeUnknownFields(other.getUnknownFields()); + + return (BuilderType) this; + } + + @Override + public BuilderType mergeFrom(final CodedInputStream input) throws IOException { + return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); + } + + @Override + public BuilderType mergeFrom( + final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) + throws IOException { + boolean discardUnknown = input.shouldDiscardUnknownFields(); + final UnknownFieldSet.Builder unknownFields = + discardUnknown ? null : getUnknownFieldSetBuilder(); + MessageReflection.mergeMessageFrom(this, unknownFields, input, extensionRegistry); + if (unknownFields != null) { + setUnknownFieldSetBuilder(unknownFields); + } + return (BuilderType) this; + } + + protected UnknownFieldSet.Builder getUnknownFieldSetBuilder() { + return UnknownFieldSet.newBuilder(getUnknownFields()); + } + + protected void setUnknownFieldSetBuilder(final UnknownFieldSet.Builder builder) { + setUnknownFields(builder.build()); + } + + @Override + public BuilderType mergeUnknownFields(final UnknownFieldSet unknownFields) { + setUnknownFields( + UnknownFieldSet.newBuilder(getUnknownFields()).mergeFrom(unknownFields).build()); + return (BuilderType) this; + } + + @Override + public Message.Builder getFieldBuilder(final FieldDescriptor field) { + throw new UnsupportedOperationException( + "getFieldBuilder() called on an unsupported message type."); + } + + @Override + public Message.Builder getRepeatedFieldBuilder(final FieldDescriptor field, int index) { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on an unsupported message type."); + } + + @Override + public String toString() { + return TextFormat.printer().printToString(this); + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + Message message) { + return new UninitializedMessageException(MessageReflection.findMissingFields(message)); + } + + /** + * Used to support nested builders and called to mark this builder as clean. Clean builders will + * propagate the {@link BuilderParent#markDirty()} event to their parent builders, while dirty + * builders will not, as their parents should be dirty already. + * + *

NOTE: Implementations that don't support nested builders don't need to override this + * method. + */ + void markClean() { + throw new IllegalStateException("Should be overridden by subclasses."); + } + + /** + * Used to support nested builders and called when this nested builder is no longer used by its + * parent builder and should release the reference to its parent builder. + * + *

NOTE: Implementations that don't support nested builders don't need to override this + * method. + */ + void dispose() { + throw new IllegalStateException("Should be overridden by subclasses."); + } + + // =============================================================== + // The following definitions seem to be required in order to make javac + // not produce weird errors like: + // + // java/com/google/protobuf/DynamicMessage.java:203: types + // com.google.protobuf.AbstractMessage.Builder< + // com.google.protobuf.DynamicMessage.Builder> and + // com.google.protobuf.AbstractMessage.Builder< + // com.google.protobuf.DynamicMessage.Builder> are incompatible; both + // define mergeFrom(com.google.protobuf.ByteString), but with unrelated + // return types. + // + // Strangely, these lines are only needed if javac is invoked separately + // on AbstractMessage.java and AbstractMessageLite.java. If javac is + // invoked on both simultaneously, it works. (Or maybe the important + // point is whether or not DynamicMessage.java is compiled together with + // AbstractMessageLite.java -- not sure.) I suspect this is a compiler + // bug. + + public BuilderType mergeFrom(final ByteString data) throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input); + input.checkLastTagWas(0); + return (BuilderType) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public BuilderType mergeFrom( + final ByteString data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (BuilderType) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public BuilderType mergeFrom(final byte[] data) throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length); + } + + public BuilderType mergeFrom(final byte[] data, final int off, final int len) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input); + input.checkLastTagWas(0); + return (BuilderType) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public BuilderType mergeFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length, extensionRegistry); + } + + public BuilderType mergeFrom( + final byte[] data, + final int off, + final int len, + final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (BuilderType) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public BuilderType mergeFrom(final InputStream input) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput); + codedInput.checkLastTagWas(0); + return (BuilderType) this; + } + + public BuilderType mergeFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput, extensionRegistry); + codedInput.checkLastTagWas(0); + return (BuilderType) this; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashLong(long n) { + return (int) (n ^ (n >>> 32)); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashBoolean(boolean b) { + return b ? 1231 : 1237; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnum(EnumLite e) { + return e.getNumber(); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnumList(List list) { + int hash = 1; + for (EnumLite e : list) { + hash = 31 * hash + hashEnum(e); + } + return hash; + } +} +} diff --git a/protobuf-api/src/main/java/com/google/protobuf/FlattenedGeneratedMessageV3.java b/protobuf-api/src/main/java/com/google/protobuf/FlattenedGeneratedMessageV3.java new file mode 100644 index 0000000..6b1933a --- /dev/null +++ b/protobuf-api/src/main/java/com/google/protobuf/FlattenedGeneratedMessageV3.java @@ -0,0 +1,4302 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. 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 +// https://developers.google.com/open-source/licenses/bsd + +package com.google.protobuf; + +import com.google.protobuf.Descriptors.Descriptor; +import com.google.protobuf.Descriptors.EnumDescriptor; +import com.google.protobuf.Descriptors.EnumValueDescriptor; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Descriptors.FileDescriptor; +import com.google.protobuf.Descriptors.OneofDescriptor; +import com.google.protobuf.Internal.BooleanList; +import com.google.protobuf.Internal.DoubleList; +import com.google.protobuf.Internal.FloatList; +import com.google.protobuf.Internal.IntList; +import com.google.protobuf.Internal.LongList; +import com.google.protobuf.Internal.ProtobufList; + +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectStreamException; +import java.io.OutputStream; +import java.io.Serializable; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import static com.google.protobuf.Internal.checkNotNull; + +/** + * All generated protocol message classes extend this class. This class implements most of the + * Message and Builder interfaces using Java reflection. Users can ignore this class and pretend + * that generated messages implement the Message interface directly. + * + * @author kenton@google.com Kenton Varda + */ +abstract class FlattenedGeneratedMessageV3 implements Message, Serializable { + private static final long serialVersionUID = 1L; + + /** + * For testing. Allows a test to disable the optimization that avoids using field builders for + * nested messages until they are requested. By disabling this optimization, existing tests can be + * reused to test the field builders. + */ + protected static boolean alwaysUseFieldBuilders = false; + + /** + * For use by generated code only. + * + *

TODO: mark this private and final (breaking change) + */ + protected UnknownFieldSet unknownFields; + + protected FlattenedGeneratedMessageV3() { + unknownFields = UnknownFieldSet.getDefaultInstance(); + } + + protected FlattenedGeneratedMessageV3(Builder builder) { + unknownFields = builder.getUnknownFields(); + } + + protected int memoizedHashCode = 0; + + public ByteString toByteString() { + try { + final ByteString.CodedBuilder out = ByteString.newCodedBuilder(getSerializedSize()); + writeTo(out.getCodedOutput()); + return out.build(); + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("ByteString"), e); + } + } + + public byte[] toByteArray() { + try { + final byte[] result = new byte[getSerializedSize()]; + final CodedOutputStream output = CodedOutputStream.newInstance(result); + writeTo(output); + output.checkNoSpaceLeft(); + return result; + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("byte array"), e); + } + } + + public void writeTo(final OutputStream output) throws IOException { + final int bufferSize = CodedOutputStream.computePreferredBufferSize(getSerializedSize()); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + writeTo(codedOutput); + codedOutput.flush(); + } + + public void writeDelimitedTo(final OutputStream output) throws IOException { + final int serialized = getSerializedSize(); + final int bufferSize = + CodedOutputStream.computePreferredBufferSize( + CodedOutputStream.computeUInt32SizeNoTag(serialized) + serialized); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + codedOutput.writeUInt32NoTag(serialized); + writeTo(codedOutput); + codedOutput.flush(); + } + + int getSerializedSize( + Schema schema) { + int memoizedSerializedSize = getMemoizedSerializedSize(); + if (memoizedSerializedSize == -1) { + memoizedSerializedSize = schema.getSerializedSize(this); + setMemoizedSerializedSize(memoizedSerializedSize); + } + return memoizedSerializedSize; + } + + private String getSerializingExceptionMessage(String target) { + return "Serializing " + + getClass().getName() + + " to a " + + target + + " threw an IOException (should never happen)."; + } + + protected static void checkByteStringIsUtf8(ByteString byteString) + throws IllegalArgumentException { + if (!byteString.isValidUtf8()) { + throw new IllegalArgumentException("Byte string is not UTF-8."); + } + } + + /** Interface for an enum which signifies which field in a {@code oneof} was specified. */ + protected interface InternalOneOfEnum { + /** + * Retrieves the field number of the field which was set in this {@code oneof}, or {@code 0} if + * none were. + */ + int getNumber(); + } + + /** + * Interface for the parent of a Builder that allows the builder to communicate invalidations back + * to the parent for use when using nested builders. + */ + protected interface BuilderParent extends Message.BuilderParent{ + + /** + * A builder becomes dirty whenever a field is modified -- including fields in nested builders + * -- and becomes clean when build() is called. Thus, when a builder becomes dirty, all its + * parents become dirty as well, and when it becomes clean, all its children become clean. The + * dirtiness state is used to invalidate certain cached values. + * + *

To this end, a builder calls markDirty() on its parent whenever it transitions from clean + * to dirty. The parent must propagate this call to its own parent, unless it was already dirty, + * in which case the grandparent must necessarily already be dirty as well. The parent can only + * transition back to "clean" after calling build() on all children. + */ + void markDirty(); + } + + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + protected int memoizedSize = -1; + + int getMemoizedSerializedSize() { + return memoizedSize; + } + + void setMemoizedSerializedSize(int size) { + memoizedSize = size; + } + + @Override + public boolean equals(final Object other) { + if (other == this) { + return true; + } + if (!(other instanceof Message)) { + return false; + } + final Message otherMessage = (Message) other; + if (getDescriptorForType() != otherMessage.getDescriptorForType()) { + return false; + } + return compareFields(getAllFields(), otherMessage.getAllFields()) + && getUnknownFields().equals(otherMessage.getUnknownFields()); + } + + @Override + public int hashCode() { + int hash = memoizedHashCode; + if (hash == 0) { + hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = hashFields(hash, getAllFields()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + } + return hash; + } + + private static ByteString toByteString(Object value) { + if (value instanceof byte[]) { + return ByteString.copyFrom((byte[]) value); + } else { + return (ByteString) value; + } + } + + /** + * Compares two bytes fields. The parameters must be either a byte array or a ByteString object. + * They can be of different type though. + */ + private static boolean compareBytes(Object a, Object b) { + if (a instanceof byte[] && b instanceof byte[]) { + return Arrays.equals((byte[]) a, (byte[]) b); + } + return toByteString(a).equals(toByteString(b)); + } + + /** Converts a list of MapEntry messages into a Map used for equals() and hashCode(). */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Map convertMapEntryListToMap(List list) { + if (list.isEmpty()) { + return Collections.emptyMap(); + } + Map result = new HashMap<>(); + Iterator iterator = list.iterator(); + Message entry = (Message) iterator.next(); + Descriptor descriptor = entry.getDescriptorForType(); + FieldDescriptor key = descriptor.findFieldByName("key"); + FieldDescriptor value = descriptor.findFieldByName("value"); + Object fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + while (iterator.hasNext()) { + entry = (Message) iterator.next(); + fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + } + return result; + } + + /** Compares two map fields. The parameters must be a list of MapEntry messages. */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static boolean compareMapField(Object a, Object b) { + Map ma = convertMapEntryListToMap((List) a); + Map mb = convertMapEntryListToMap((List) b); + return MapFieldLite.equals(ma, mb); + } + + /** + * Compares two sets of fields. This method is used to implement {@link + * AbstractMessage#equals(Object)} and {@link AbstractMutableMessage#equals(Object)}. It takes + * special care of bytes fields because immutable messages and mutable messages use different Java + * type to represent a bytes field and this method should be able to compare immutable messages, + * mutable messages and also an immutable message to a mutable message. + */ + static boolean compareFields(Map a, Map b) { + if (a.size() != b.size()) { + return false; + } + for (FieldDescriptor descriptor : a.keySet()) { + if (!b.containsKey(descriptor)) { + return false; + } + Object value1 = a.get(descriptor); + Object value2 = b.get(descriptor); + if (descriptor.getType() == FieldDescriptor.Type.BYTES) { + if (descriptor.isRepeated()) { + List list1 = (List) value1; + List list2 = (List) value2; + if (list1.size() != list2.size()) { + return false; + } + for (int i = 0; i < list1.size(); i++) { + if (!compareBytes(list1.get(i), list2.get(i))) { + return false; + } + } + } else { + // Compares a singular bytes field. + if (!compareBytes(value1, value2)) { + return false; + } + } + } else if (descriptor.isMapField()) { + if (!compareMapField(value1, value2)) { + return false; + } + } else { + // Compare non-bytes fields. + if (!value1.equals(value2)) { + return false; + } + } + } + return true; + } + + /** Calculates the hash code of a map field. {@code value} must be a list of MapEntry messages. */ + @SuppressWarnings("unchecked") + private static int hashMapField(Object value) { + return MapFieldLite.calculateHashCodeForMap(convertMapEntryListToMap((List) value)); + } + + /** Get a hash code for given fields and values, using the given seed. */ + @SuppressWarnings("unchecked") + protected static int hashFields(int hash, Map map) { + for (Map.Entry entry : map.entrySet()) { + FieldDescriptor field = entry.getKey(); + Object value = entry.getValue(); + hash = (37 * hash) + field.getNumber(); + if (field.isMapField()) { + hash = (53 * hash) + hashMapField(value); + } else if (field.getType() != FieldDescriptor.Type.ENUM) { + hash = (53 * hash) + value.hashCode(); + } else if (field.isRepeated()) { + List list = (List) value; + hash = (53 * hash) + Internal.hashEnumList(list); + } else { + hash = (53 * hash) + Internal.hashEnum((Internal.EnumLite) value); + } + } + return hash; + } + +// /** +// * Package private helper method for AbstractParser to create UninitializedMessageException with +// * missing field information. +// */ +// UninitializedMessageException newUninitializedMessageException() { +// return AbstractMessage.Builder.newUninitializedMessageException(this); +// } + + /** TODO: Remove this unnecessary intermediate implementation of this method. */ + @Override + public Parser getParserForType() { + throw new UnsupportedOperationException("This is supposed to be overridden by subclasses."); + } + + /** + * TODO: Stop using SingleFieldBuilder and remove this setting + * + * @see #setAlwaysUseFieldBuildersForTesting(boolean) + */ + static void enableAlwaysUseFieldBuildersForTesting() { + setAlwaysUseFieldBuildersForTesting(true); + } + + /** + * For testing. Allows a test to disable/re-enable the optimization that avoids using field + * builders for nested messages until they are requested. By disabling this optimization, existing + * tests can be reused to test the field builders. See {@link RepeatedFieldBuilder} and {@link + * SingleFieldBuilder}. + * + *

TODO: Stop using SingleFieldBuilder and remove this setting + */ + static void setAlwaysUseFieldBuildersForTesting(boolean useBuilders) { + alwaysUseFieldBuilders = useBuilders; + } + + /** + * Get the FieldAccessorTable for this type. We can't have the message class pass this in to the + * constructor because of bootstrapping trouble with DescriptorProtos. + */ + protected abstract FieldAccessorTable internalGetFieldAccessorTable(); + + public Descriptor getDescriptorForType() { + return internalGetFieldAccessorTable().descriptor; + } + + /** + * TODO: This method should be removed. It enables parsing directly into an + * "immutable" message. Have to leave it for now to support old gencode. + * + * @deprecated use newBuilder().mergeFrom() instead + */ + @Deprecated + protected void mergeFromAndMakeImmutableInternal( + CodedInputStream input, ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + Schema schema = Protobuf.getInstance().schemaFor(this); + try { + schema.mergeFrom(this, CodedInputStreamReader.forCodedInput(input), extensionRegistry); + } catch (InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (IOException e) { + throw new InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } + schema.makeImmutable(this); + } + + /** + * Internal helper to return a modifiable map containing all the fields. The returned Map is + * modifiable so that the caller can add additional extension fields to implement {@link + * #getAllFields()}. + * + * @param getBytesForString whether to generate ByteString for string fields + */ + private Map getAllFieldsMutable(boolean getBytesForString) { + final TreeMap result = new TreeMap<>(); + final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; + final List fields = descriptor.getFields(); + + for (int i = 0; i < fields.size(); i++) { + FieldDescriptor field = fields.get(i); + final OneofDescriptor oneofDescriptor = field.getContainingOneof(); + + /* + * If the field is part of a Oneof, then at maximum one field in the Oneof is set + * and it is not repeated. There is no need to iterate through the others. + */ + if (oneofDescriptor != null) { + // Skip other fields in the Oneof we know are not set + i += oneofDescriptor.getFieldCount() - 1; + if (!hasOneof(oneofDescriptor)) { + // If no field is set in the Oneof, skip all the fields in the Oneof + continue; + } + // Get the pointer to the only field which is set in the Oneof + field = getOneofFieldDescriptor(oneofDescriptor); + } else { + // If we are not in a Oneof, we need to check if the field is set and if it is repeated + if (field.isRepeated()) { + final List value = (List) getField(field); + if (!value.isEmpty()) { + result.put(field, value); + } + continue; + } + if (!hasField(field)) { + continue; + } + } + // Add the field to the map + if (getBytesForString && field.getJavaType() == FieldDescriptor.JavaType.STRING) { + result.put(field, getFieldRaw(field)); + } else { + result.put(field, getField(field)); + } + } + return result; + } + + // TODO: compute this at {@code build()} time in the Builder class. + public boolean isInitialized() { + for (final FieldDescriptor field : getDescriptorForType().getFields()) { + // Check that all required fields are present. + if (field.isRequired()) { + if (!hasField(field)) { + return false; + } + } + // Check that embedded messages are initialized. + if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + if (field.isRepeated()) { + @SuppressWarnings("unchecked") + final List messageList = (List) getField(field); + for (final Message element : messageList) { + if (!element.isInitialized()) { + return false; + } + } + } else { + if (hasField(field) && !((Message) getField(field)).isInitialized()) { + return false; + } + } + } + } + + return true; + } + + public Map getAllFields() { + return Collections.unmodifiableMap(getAllFieldsMutable(/* getBytesForString= */ false)); + } + + /** + * Returns a collection of all the fields in this message which are set and their corresponding + * values. A singular ("required" or "optional") field is set iff hasField() returns true for that + * field. A "repeated" field is set iff getRepeatedFieldCount() is greater than zero. The values + * are exactly what would be returned by calling {@link #getFieldRaw(FieldDescriptor)} + * for each field. The map is guaranteed to be a sorted map, so iterating over it will return + * fields in order by field number. + */ + Map getAllFieldsRaw() { + return Collections.unmodifiableMap(getAllFieldsMutable(/* getBytesForString= */ true)); + } + + public boolean hasOneof(final OneofDescriptor oneof) { + return internalGetFieldAccessorTable().getOneof(oneof).has(this); + } + + public FieldDescriptor getOneofFieldDescriptor(final OneofDescriptor oneof) { + return internalGetFieldAccessorTable().getOneof(oneof).get(this); + } + + public boolean hasField(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).has(this); + } + + public Object getField(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).get(this); + } + + /** + * Obtains the value of the given field, or the default value if it is not set. For primitive + * fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the + * value is returned. For embedded message fields, the sub-message is returned. For repeated + * fields, a java.util.List is returned. For present string fields, a ByteString is returned + * representing the bytes that the field contains. + */ + Object getFieldRaw(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).getRaw(this); + } + + public int getRepeatedFieldCount(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).getRepeatedCount(this); + } + + public Object getRepeatedField(final FieldDescriptor field, final int index) { + return internalGetFieldAccessorTable().getField(field).getRepeated(this, index); + } + + // TODO: This method should be final. + public UnknownFieldSet getUnknownFields() { + return unknownFields; + } + + // TODO: This should go away when Schema classes cannot modify immutable + // GeneratedMessageV3 objects anymore. + void setUnknownFields(UnknownFieldSet unknownFields) { + this.unknownFields = unknownFields; + } + + /** + * Called by subclasses to parse an unknown field. + * + *

TODO remove this method + * + * @return {@code true} unless the tag is an end-group tag. + */ + protected boolean parseUnknownField( + CodedInputStream input, + UnknownFieldSet.Builder unknownFields, + ExtensionRegistryLite extensionRegistry, + int tag) + throws IOException { + if (input.shouldDiscardUnknownFields()) { + return input.skipField(tag); + } + return unknownFields.mergeFieldFrom(tag, input); + } + + /** + * Delegates to parseUnknownField. This method is obsolete, but we must retain it for + * compatibility with older generated code. + * + *

TODO remove this method + */ + protected boolean parseUnknownFieldProto3( + CodedInputStream input, + UnknownFieldSet.Builder unknownFields, + ExtensionRegistryLite extensionRegistry, + int tag) + throws IOException { + return parseUnknownField(input, unknownFields, extensionRegistry, tag); + } + + /** Used by generated code. */ + @SuppressWarnings("ProtoParseWithRegistry") + protected static M parseWithIOException(Parser parser, InputStream input) + throws IOException { + try { + return parser.parseFrom(input); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + /** Used by generated code. */ + protected static M parseWithIOException( + Parser parser, InputStream input, ExtensionRegistryLite extensions) throws IOException { + try { + return parser.parseFrom(input, extensions); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + /** Used by generated code. */ + @SuppressWarnings("ProtoParseWithRegistry") + protected static M parseWithIOException( + Parser parser, CodedInputStream input) throws IOException { + try { + return parser.parseFrom(input); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + /** Used by generated code. */ + protected static M parseWithIOException( + Parser parser, CodedInputStream input, ExtensionRegistryLite extensions) + throws IOException { + try { + return parser.parseFrom(input, extensions); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + /** Used by generated code. */ + @SuppressWarnings("ProtoParseWithRegistry") + protected static M parseDelimitedWithIOException( + Parser parser, InputStream input) throws IOException { + try { + return parser.parseDelimitedFrom(input); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + /** Used by generated code. */ + protected static M parseDelimitedWithIOException( + Parser parser, InputStream input, ExtensionRegistryLite extensions) throws IOException { + try { + return parser.parseDelimitedFrom(input, extensions); + } catch (InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } + } + + protected static boolean canUseUnsafe() { + return UnsafeUtil.hasUnsafeArrayOperations() && UnsafeUtil.hasUnsafeByteBufferOperations(); + } + + protected static IntList emptyIntList() { + return IntArrayList.emptyList(); + } + + // TODO: Unused. Remove. + protected static IntList newIntList() { + return new IntArrayList(); + } + + // TODO: Redundant with makeMutableCopy(). Remove. + protected static IntList mutableCopy(IntList list) { + return makeMutableCopy(list); + } + + // TODO: Redundant with makeMutableCopy(). Remove. + protected static LongList mutableCopy(LongList list) { + return makeMutableCopy(list); + } + + // TODO: Redundant with makeMutableCopy(). Remove. + protected static FloatList mutableCopy(FloatList list) { + return makeMutableCopy(list); + } + + // TODO: Redundant with makeMutableCopy(). Remove. + protected static DoubleList mutableCopy(DoubleList list) { + return makeMutableCopy(list); + } + + // TODO: Redundant with makeMutableCopy(). Remove. + protected static BooleanList mutableCopy(BooleanList list) { + return makeMutableCopy(list); + } + + protected static LongList emptyLongList() { + return LongArrayList.emptyList(); + } + + // TODO: Unused. Remove. + protected static LongList newLongList() { + return new LongArrayList(); + } + + protected static FloatList emptyFloatList() { + return FloatArrayList.emptyList(); + } + + // TODO: Unused. Remove. + protected static FloatList newFloatList() { + return new FloatArrayList(); + } + + protected static DoubleList emptyDoubleList() { + return DoubleArrayList.emptyList(); + } + + // TODO: Unused. Remove. + protected static DoubleList newDoubleList() { + return new DoubleArrayList(); + } + + protected static BooleanList emptyBooleanList() { + return BooleanArrayList.emptyList(); + } + + // TODO: Unused. Remove. + protected static BooleanList newBooleanList() { + return new BooleanArrayList(); + } + + protected static > ListT makeMutableCopy(ListT list) { + return makeMutableCopy(list, 0); + } + + @SuppressWarnings("unchecked") // Guaranteed by proto runtime. + protected static > ListT makeMutableCopy( + ListT list, int minCapacity) { + int size = list.size(); + if (minCapacity <= size) { + minCapacity = size * 2; + } + if (minCapacity <= 0) { + minCapacity = AbstractProtobufList.DEFAULT_CAPACITY; + } + + return (ListT) list.mutableCopyWithCapacity(minCapacity); + } + + @SuppressWarnings("unchecked") // The empty list can be safely cast + protected static ProtobufList emptyList(Class elementType) { + return (ProtobufList) ProtobufArrayList.emptyList(); + } + + public void writeTo(final CodedOutputStream output) throws IOException { + MessageReflection.writeMessageTo(this, getAllFieldsRaw(), output, false); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) { + return size; + } + + memoizedSize = MessageReflection.getSerializedSize( + this, getAllFieldsRaw()); + return memoizedSize; + } + + /** + * This class is used to make a generated protected method inaccessible from user's code (e.g., + * the {@link #newInstance} method below). When this class is used as a parameter's type in a + * generated protected method, the method is visible to user's code in the same package, but since + * the constructor of this class is private to protobuf runtime, user's code can't obtain an + * instance of this class and as such can't actually make a method call on the protected method. + */ + protected static final class UnusedPrivateParameter { + static final UnusedPrivateParameter INSTANCE = new UnusedPrivateParameter(); + + private UnusedPrivateParameter() {} + } + + /** Creates a new instance of this message type. Overridden in the generated code. */ + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + throw new UnsupportedOperationException("This method must be overridden by the subclass."); + } + + /** + * Used by parsing constructors in generated classes. + * + *

TODO: remove unused method (extensions should be immutable after build) + */ + protected void makeExtensionsImmutable() { + // Noop for messages without extensions. + } + + /** TODO: remove this together with GeneratedMessageV3.BuilderParent. */ + protected abstract Message.Builder newBuilderForType(BuilderParent parent); + + /** TODO: generated class should implement this directly */ + protected Message.Builder newBuilderForType(final Message.BuilderParent parent) { + return newBuilderForType( + new BuilderParent() { + @Override + public void markDirty() { + parent.markDirty(); + } + }); + } + + /** Builder class for {@link FlattenedGeneratedMessageV3}. */ + @SuppressWarnings("unchecked") + public abstract static class Builder> + implements Message.Builder { + + private BuilderParent builderParent; + + private BuilderParentImpl meAsParent; + + // Indicates that we've built a message and so we are now obligated + // to dispatch dirty invalidations. See GeneratedMessageV3.BuilderListener. + private boolean isClean; + + /** + * This field holds either an {@link UnknownFieldSet} or {@link UnknownFieldSet.Builder}. + * + *

We use an object because it should only be one or the other of those things at a time and + * Object is the only common base. This also saves space. + * + *

Conversions are lazy: if {@link #setUnknownFields} is called, this will contain {@link + * UnknownFieldSet}. If unknown fields are merged into this builder, the current {@link + * UnknownFieldSet} will be converted to a {@link UnknownFieldSet.Builder} and left that way + * until either {@link #setUnknownFields} or {@link #buildPartial} or {@link #build} is called. + */ + private Object unknownFieldsOrBuilder = UnknownFieldSet.getDefaultInstance(); + + protected Builder() { + this(null); + } + + protected Builder(BuilderParent builderParent) { + this.builderParent = builderParent; + } + + static final class LimitedInputStream extends FilterInputStream { + private int limit; + + LimitedInputStream(InputStream in, int limit) { + super(in); + this.limit = limit; + } + + @Override + public int available() throws IOException { + return Math.min(super.available(), limit); + } + + @Override + public int read() throws IOException { + if (limit <= 0) { + return -1; + } + final int result = super.read(); + if (result >= 0) { + --limit; + } + return result; + } + + @Override + public int read(final byte[] b, final int off, int len) throws IOException { + if (limit <= 0) { + return -1; + } + len = Math.min(len, limit); + final int result = super.read(b, off, len); + if (result >= 0) { + limit -= result; + } + return result; + } + + @Override + public long skip(final long n) throws IOException { + // because we take the minimum of an int and a long, result is guaranteed to be + // less than or equal to Integer.MAX_INT so this cast is safe + int result = (int) super.skip(Math.min(n, limit)); + if (result >= 0) { + // if the superclass adheres to the contract for skip, this condition is always true + limit -= result; + } + return result; + } + } + + @Override + public boolean mergeDelimitedFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final int firstByte = input.read(); + if (firstByte == -1) { + return false; + } + final int size = CodedInputStream.readRawVarint32(firstByte, input); + final InputStream limitedInput = new AbstractMessageLite.Builder.LimitedInputStream(input, size); + mergeFrom(limitedInput, extensionRegistry); + return true; + } + + @Override + public boolean mergeDelimitedFrom(final InputStream input) throws IOException { + return mergeDelimitedFrom(input, ExtensionRegistryLite.getEmptyRegistry()); + } + + @Override + @SuppressWarnings("unchecked") // isInstance takes care of this + public BuilderT mergeFrom(final MessageLite other) { + if (!getDefaultInstanceForType().getClass().isInstance(other)) { + throw new IllegalArgumentException( + "mergeFrom(MessageLite) can only merge messages of the same type."); + } + + return internalMergeFrom(other); + } + + private String getReadingExceptionMessage(String target) { + return "Reading " + + getClass().getName() + + " from a " + + target + + " threw an IOException (should never happen)."; + } + + // We check nulls as we iterate to avoid iterating over values twice. + private static void addAllCheckingNulls(Iterable values, List list) { + if (list instanceof ArrayList && values instanceof Collection) { + ((ArrayList) list).ensureCapacity(list.size() + ((Collection) values).size()); + } + int begin = list.size(); + for (T value : values) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (list.size() - begin) + " is null."; + for (int i = list.size() - 1; i >= begin; i--) { + list.remove(i); + } + throw new NullPointerException(message); + } + list.add(value); + } + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + MessageLite message) { + return new UninitializedMessageException(message); + } + + // For binary compatibility. + @Deprecated + protected static void addAll(final Iterable values, final Collection list) { + addAll(values, (List) list); + } + + /** + * Adds the {@code values} to the {@code list}. This is a helper method used by generated code. + * Users should ignore it. + * + * @throws NullPointerException if {@code values} or any of the elements of {@code values} is + * null. + */ + protected static void addAll(final Iterable values, final List list) { + checkNotNull(values); + if (values instanceof LazyStringList) { + // For StringOrByteStringLists, check the underlying elements to avoid + // forcing conversions of ByteStrings to Strings. + // TODO: Could we just prohibit nulls in all protobuf lists and get rid of this? Is + // if even possible to hit this condition as all protobuf methods check for null first, + // right? + List lazyValues = ((LazyStringList) values).getUnderlyingElements(); + LazyStringList lazyList = (LazyStringList) list; + int begin = list.size(); + for (Object value : lazyValues) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (lazyList.size() - begin) + " is null."; + for (int i = lazyList.size() - 1; i >= begin; i--) { + lazyList.remove(i); + } + throw new NullPointerException(message); + } + if (value instanceof ByteString) { + lazyList.add((ByteString) value); + } else { + lazyList.add((String) value); + } + } + } else { + if (values instanceof PrimitiveNonBoxingCollection) { + list.addAll((Collection) values); + } else { + addAllCheckingNulls(values, list); + } + } + } + + @Override + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + @Override + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + protected BuilderT internalMergeFrom(MessageLite other) { + return mergeFrom((Message) other); + } + + @Override + public BuilderT mergeFrom(final Message other) { + return mergeFrom(other, other.getAllFields()); + } + + BuilderT mergeFrom(final Message other, Map allFields) { + if (other.getDescriptorForType() != getDescriptorForType()) { + throw new IllegalArgumentException( + "mergeFrom(Message) can only merge messages of the same type."); + } + + // Note: We don't attempt to verify that other's fields have valid + // types. Doing so would be a losing battle. We'd have to verify + // all sub-messages as well, and we'd have to make copies of all of + // them to insure that they don't change after verification (since + // the Message interface itself cannot enforce immutability of + // implementations). + + for (final Map.Entry entry : allFields.entrySet()) { + final FieldDescriptor field = entry.getKey(); + if (field.isRepeated()) { + for (final Object element : (List) entry.getValue()) { + addRepeatedField(field, element); + } + } else if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + final Message existingValue = (Message) getField(field); + if (existingValue == existingValue.getDefaultInstanceForType()) { + setField(field, entry.getValue()); + } else { + setField( + field, + existingValue + .newBuilderForType() + .mergeFrom(existingValue) + .mergeFrom((Message) entry.getValue()) + .build()); + } + } else { + setField(field, entry.getValue()); + } + } + + mergeUnknownFields(other.getUnknownFields()); + + return (BuilderT) this; + } + + @Override + public BuilderT mergeFrom(final CodedInputStream input) throws IOException { + return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); + } + + @Override + public BuilderT mergeFrom( + final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) + throws IOException { + boolean discardUnknown = input.shouldDiscardUnknownFields(); + final UnknownFieldSet.Builder unknownFields = + discardUnknown ? null : getUnknownFieldSetBuilder(); + MessageReflection.mergeMessageFrom(this, unknownFields, input, extensionRegistry); + if (unknownFields != null) { + setUnknownFieldSetBuilder(unknownFields); + } + return (BuilderT) this; + } + + @Override + public String toString() { + return TextFormat.printer().printToString(this); + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + Message message) { + return new UninitializedMessageException(MessageReflection.findMissingFields(message)); + } + + // =============================================================== + // The following definitions seem to be required in order to make javac + // not produce weird errors like: + // + // java/com/google/protobuf/DynamicMessage.java:203: types + // com.google.protobuf.AbstractMessage.Builder< + // com.google.protobuf.DynamicMessage.Builder> and + // com.google.protobuf.AbstractMessage.Builder< + // com.google.protobuf.DynamicMessage.Builder> are incompatible; both + // define mergeFrom(com.google.protobuf.ByteString), but with unrelated + // return types. + // + // Strangely, these lines are only needed if javac is invoked separately + // on AbstractMessage.java and AbstractMessageLite.java. If javac is + // invoked on both simultaneously, it works. (Or maybe the important + // point is whether or not DynamicMessage.java is compiled together with + // AbstractMessageLite.java -- not sure.) I suspect this is a compiler + // bug. + + public BuilderT mergeFrom(final ByteString data) throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input); + input.checkLastTagWas(0); + return (BuilderT) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public BuilderT mergeFrom( + final ByteString data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (BuilderT) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public BuilderT mergeFrom(final byte[] data) throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length); + } + + public BuilderT mergeFrom(final byte[] data, final int off, final int len) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input); + input.checkLastTagWas(0); + return (BuilderT) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public BuilderT mergeFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length, extensionRegistry); + } + + public BuilderT mergeFrom( + final byte[] data, + final int off, + final int len, + final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (BuilderT) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public BuilderT mergeFrom(final InputStream input) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput); + codedInput.checkLastTagWas(0); + return (BuilderT) this; + } + + public BuilderT mergeFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput, extensionRegistry); + codedInput.checkLastTagWas(0); + return (BuilderT) this; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashLong(long n) { + return (int) (n ^ (n >>> 32)); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashBoolean(boolean b) { + return b ? 1231 : 1237; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnum(Internal.EnumLite e) { + return e.getNumber(); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnumList(List list) { + int hash = 1; + for (Internal.EnumLite e : list) { + hash = 31 * hash + hashEnum(e); + } + return hash; + } + + void dispose() { + builderParent = null; + } + + /** Called by the subclass when a message is built. */ + protected void onBuilt() { + if (builderParent != null) { + markClean(); + } + } + + /** + * Called by the subclass or a builder to notify us that a message was built and may be cached + * and therefore invalidations are needed. + */ + protected void markClean() { + this.isClean = true; + } + + /** + * Gets whether invalidations are needed + * + * @return whether invalidations are needed + */ + protected boolean isClean() { + return isClean; + } + + @Override + public BuilderT clone() { + BuilderT builder = (BuilderT) getDefaultInstanceForType().newBuilderForType(); + builder.mergeFrom(buildPartial()); + return builder; + } + + /** + * Called by the initialization and clear code paths to allow subclasses to reset any of their + * builtin fields back to the initial values. + */ + @Override + public BuilderT clear() { + unknownFieldsOrBuilder = UnknownFieldSet.getDefaultInstance(); + onChanged(); + return (BuilderT) this; + } + + /** + * Get the FieldAccessorTable for this type. We can't have the message class pass this in to the + * constructor because of bootstrapping trouble with DescriptorProtos. + */ + protected abstract FieldAccessorTable internalGetFieldAccessorTable(); + + @Override + public Descriptor getDescriptorForType() { + return internalGetFieldAccessorTable().descriptor; + } + + @Override + public Map getAllFields() { + return Collections.unmodifiableMap(getAllFieldsMutable()); + } + + /** Internal helper which returns a mutable map. */ + private Map getAllFieldsMutable() { + final TreeMap result = new TreeMap<>(); + final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; + final List fields = descriptor.getFields(); + + for (int i = 0; i < fields.size(); i++) { + FieldDescriptor field = fields.get(i); + final OneofDescriptor oneofDescriptor = field.getContainingOneof(); + + /* + * If the field is part of a Oneof, then at maximum one field in the Oneof is set + * and it is not repeated. There is no need to iterate through the others. + */ + if (oneofDescriptor != null) { + // Skip other fields in the Oneof we know are not set + i += oneofDescriptor.getFieldCount() - 1; + if (!hasOneof(oneofDescriptor)) { + // If no field is set in the Oneof, skip all the fields in the Oneof + continue; + } + // Get the pointer to the only field which is set in the Oneof + field = getOneofFieldDescriptor(oneofDescriptor); + } else { + // If we are not in a Oneof, we need to check if the field is set and if it is repeated + if (field.isRepeated()) { + final List value = (List) getField(field); + if (!value.isEmpty()) { + result.put(field, value); + } + continue; + } + if (!hasField(field)) { + continue; + } + } + // Add the field to the map + result.put(field, getField(field)); + } + return result; + } + + @Override + public Message.Builder newBuilderForField(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).newBuilder(); + } + + @Override + public Message.Builder getFieldBuilder(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).getBuilder(this); + } + + @Override + public Message.Builder getRepeatedFieldBuilder(final FieldDescriptor field, int index) { + return internalGetFieldAccessorTable().getField(field).getRepeatedBuilder(this, index); + } + + @Override + public boolean hasOneof(final OneofDescriptor oneof) { + return internalGetFieldAccessorTable().getOneof(oneof).has(this); + } + + @Override + public FieldDescriptor getOneofFieldDescriptor(final OneofDescriptor oneof) { + return internalGetFieldAccessorTable().getOneof(oneof).get(this); + } + + @Override + public boolean hasField(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).has(this); + } + + @Override + public Object getField(final FieldDescriptor field) { + Object object = internalGetFieldAccessorTable().getField(field).get(this); + if (field.isRepeated()) { + // The underlying list object is still modifiable at this point. + // Make sure not to expose the modifiable list to the caller. + return Collections.unmodifiableList((List) object); + } else { + return object; + } + } + + @Override + public BuilderT setField(final FieldDescriptor field, final Object value) { + internalGetFieldAccessorTable().getField(field).set(this, value); + return (BuilderT) this; + } + + @Override + public BuilderT clearField(final FieldDescriptor field) { + internalGetFieldAccessorTable().getField(field).clear(this); + return (BuilderT) this; + } + + @Override + public BuilderT clearOneof(final OneofDescriptor oneof) { + internalGetFieldAccessorTable().getOneof(oneof).clear(this); + return (BuilderT) this; + } + + @Override + public int getRepeatedFieldCount(final FieldDescriptor field) { + return internalGetFieldAccessorTable().getField(field).getRepeatedCount(this); + } + + @Override + public Object getRepeatedField(final FieldDescriptor field, final int index) { + return internalGetFieldAccessorTable().getField(field).getRepeated(this, index); + } + + @Override + public BuilderT setRepeatedField( + final FieldDescriptor field, final int index, final Object value) { + internalGetFieldAccessorTable().getField(field).setRepeated(this, index, value); + return (BuilderT) this; + } + + @Override + public BuilderT addRepeatedField(final FieldDescriptor field, final Object value) { + internalGetFieldAccessorTable().getField(field).addRepeated(this, value); + return (BuilderT) this; + } + + private BuilderT setUnknownFieldsInternal(final UnknownFieldSet unknownFields) { + unknownFieldsOrBuilder = unknownFields; + onChanged(); + return (BuilderT) this; + } + + @Override + public BuilderT setUnknownFields(final UnknownFieldSet unknownFields) { + return setUnknownFieldsInternal(unknownFields); + } + + /** + * This method is obsolete, but we must retain it for compatibility with older generated code. + */ + protected BuilderT setUnknownFieldsProto3(final UnknownFieldSet unknownFields) { + return setUnknownFieldsInternal(unknownFields); + } + + @Override + public BuilderT mergeUnknownFields(final UnknownFieldSet unknownFields) { + if (UnknownFieldSet.getDefaultInstance().equals(unknownFields)) { + return (BuilderT) this; + } + + if (UnknownFieldSet.getDefaultInstance().equals(unknownFieldsOrBuilder)) { + unknownFieldsOrBuilder = unknownFields; + onChanged(); + return (BuilderT) this; + } + + getUnknownFieldSetBuilder().mergeFrom(unknownFields); + onChanged(); + return (BuilderT) this; + } + + @Override + public boolean isInitialized() { + for (final FieldDescriptor field : getDescriptorForType().getFields()) { + // Check that all required fields are present. + if (field.isRequired()) { + if (!hasField(field)) { + return false; + } + } + // Check that embedded messages are initialized. + if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + if (field.isRepeated()) { + @SuppressWarnings("unchecked") + final List messageList = (List) getField(field); + for (final Message element : messageList) { + if (!element.isInitialized()) { + return false; + } + } + } else { + if (hasField(field) && !((Message) getField(field)).isInitialized()) { + return false; + } + } + } + } + return true; + } + + @Override + public final UnknownFieldSet getUnknownFields() { + if (unknownFieldsOrBuilder instanceof UnknownFieldSet) { + return (UnknownFieldSet) unknownFieldsOrBuilder; + } else { + return ((UnknownFieldSet.Builder) unknownFieldsOrBuilder).buildPartial(); + } + } + + /** + * Called by generated subclasses to parse an unknown field. + * + * @return {@code true} unless the tag is an end-group tag. + */ + protected boolean parseUnknownField( + CodedInputStream input, ExtensionRegistryLite extensionRegistry, int tag) + throws IOException { + if (input.shouldDiscardUnknownFields()) { + return input.skipField(tag); + } + return getUnknownFieldSetBuilder().mergeFieldFrom(tag, input); + } + + /** Called by generated subclasses to add to the unknown field set. */ + protected final void mergeUnknownLengthDelimitedField(int number, ByteString bytes) { + getUnknownFieldSetBuilder().mergeLengthDelimitedField(number, bytes); + } + + /** Called by generated subclasses to add to the unknown field set. */ + protected final void mergeUnknownVarintField(int number, int value) { + getUnknownFieldSetBuilder().mergeVarintField(number, value); + } + + protected UnknownFieldSet.Builder getUnknownFieldSetBuilder() { + if (unknownFieldsOrBuilder instanceof UnknownFieldSet) { + unknownFieldsOrBuilder = ((UnknownFieldSet) unknownFieldsOrBuilder).toBuilder(); + } + onChanged(); + return (UnknownFieldSet.Builder) unknownFieldsOrBuilder; + } + + protected void setUnknownFieldSetBuilder(UnknownFieldSet.Builder builder) { + unknownFieldsOrBuilder = builder; + onChanged(); + } + + /** + * Implementation of {@link BuilderParent} for giving to our children. This small inner class + * makes it so we don't publicly expose the BuilderParent methods. + */ + private class BuilderParentImpl implements BuilderParent { + + @Override + public void markDirty() { + onChanged(); + } + } + + /** + * Gets the {@link BuilderParent} for giving to our children. + * + * @return The builder parent for our children. + */ + protected BuilderParent getParentForChildren() { + if (meAsParent == null) { + meAsParent = new BuilderParentImpl(); + } + return meAsParent; + } + + /** + * Called when a builder or one of its nested children has changed and any parent should be + * notified of its invalidation. + */ + protected final void onChanged() { + if (isClean && builderParent != null) { + builderParent.markDirty(); + + // Don't keep dispatching invalidations until build is called again. + isClean = false; + } + } + + /** + * Gets the map field with the given field number. This method should be overridden in the + * generated message class if the message contains map fields. + * + *

Unlike other field types, reflection support for map fields can't be implemented based on + * generated public API because we need to access a map field as a list in reflection API but + * the generated API only allows us to access it as a map. This method returns the underlying + * map field directly and thus enables us to access the map field as a list. + */ + @SuppressWarnings({"unused", "rawtypes"}) + protected MapFieldReflectionAccessor internalGetMapFieldReflection(int fieldNumber) { + return internalGetMapField(fieldNumber); + } + + /** TODO: Remove, exists for compatibility with generated code. */ + @Deprecated + @SuppressWarnings({"unused", "rawtypes"}) + protected MapField internalGetMapField(int fieldNumber) { + // Note that we can't use descriptor names here because this method will + // be called when descriptor is being initialized. + throw new IllegalArgumentException("No map fields found in " + getClass().getName()); + } + + /** Like {@link #internalGetMapFieldReflection} but return a mutable version. */ + @SuppressWarnings({"unused", "rawtypes"}) + protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int fieldNumber) { + return internalGetMutableMapField(fieldNumber); + } + + /** TODO: Remove, exists for compatibility with generated code. */ + @Deprecated + @SuppressWarnings({"unused", "rawtypes"}) + protected MapField internalGetMutableMapField(int fieldNumber) { + // Note that we can't use descriptor names here because this method will + // be called when descriptor is being initialized. + throw new IllegalArgumentException("No map fields found in " + getClass().getName()); + } + } + + // ================================================================= + // Extensions-related stuff + + /** Extends {@link MessageOrBuilder} with extension-related functions. */ + public interface ExtendableMessageOrBuilder> + extends MessageOrBuilder { + // Re-define for return type covariance. + @Override + Message getDefaultInstanceForType(); + + /** Check if a singular extension is present. */ + boolean hasExtension(ExtensionLite extension); + + /** Get the number of elements in a repeated extension. */ + int getExtensionCount(ExtensionLite> extension); + + /** Get the value of an extension. */ + T getExtension(ExtensionLite extension); + + /** Get one element of a repeated extension. */ + T getExtension(ExtensionLite> extension, int index); + + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + boolean hasExtension( + Extension extension); + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + boolean hasExtension( + GeneratedExtension extension); + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + int getExtensionCount( + Extension> extension); + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + int getExtensionCount( + GeneratedExtension> extension); + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + T getExtension( + Extension extension); + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + T getExtension( + GeneratedExtension extension); + /** + * Get one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + T getExtension( + Extension> extension, + int index); + /** + * Get one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + T getExtension( + GeneratedExtension> extension, + int index); + } + + /** + * Generated message classes for message types that contain extension ranges subclass this. + * + *

This class implements type-safe accessors for extensions. They implement all the same + * operations that you can do with normal fields -- e.g. "has", "get", and "getCount" -- but for + * extensions. The extensions are identified using instances of the class {@link + * GeneratedExtension}; the protocol compiler generates a static instance of this class for every + * extension in its input. Through the magic of generics, all is made type-safe. + * + *

For example, imagine you have the {@code .proto} file: + * + *

+   * option java_class = "MyProto";
+   *
+   * message Foo {
+   *   extensions 1000 to max;
+   * }
+   *
+   * extend Foo {
+   *   optional int32 bar;
+   * }
+   * 
+ * + *

Then you might write code like: + * + *

+   * MyProto.Foo foo = getFoo();
+   * int i = foo.getExtension(MyProto.bar);
+   * 
+ * + *

See also {@link ExtendableBuilder}. + */ + public abstract static class ExtendableMessage> + extends FlattenedGeneratedMessageV3 implements ExtendableMessageOrBuilder { + + private static final long serialVersionUID = 1L; + + private final FieldSet extensions; + + protected ExtendableMessage() { + this.extensions = FieldSet.newFieldSet(); + } + + protected ExtendableMessage(ExtendableBuilder builder) { + super(builder); + this.extensions = builder.buildExtensions(); + } + + private void verifyExtensionContainingType(final Extension extension) { + if (extension.getDescriptor().getContainingType() != getDescriptorForType()) { + // This can only happen if someone uses unchecked operations. + throw new IllegalArgumentException( + "Extension is for type \"" + + extension.getDescriptor().getContainingType().getFullName() + + "\" which does not match message type \"" + + getDescriptorForType().getFullName() + + "\"."); + } + } + + /** Check if a singular extension is present. */ + @Override + public final boolean hasExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + return extensions.hasField(extension.getDescriptor()); + } + + /** Get the number of elements in a repeated extension. */ + @Override + public final int getExtensionCount(final ExtensionLite> extensionLite) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + final FieldDescriptor descriptor = extension.getDescriptor(); + return extensions.getRepeatedFieldCount(descriptor); + } + + /** Get the value of an extension. */ + @Override + @SuppressWarnings("unchecked") + public final T getExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + FieldDescriptor descriptor = extension.getDescriptor(); + final Object value = extensions.getField(descriptor); + if (value == null) { + if (descriptor.isRepeated()) { + return (T) Collections.emptyList(); + } else if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + return (T) extension.getMessageDefaultInstance(); + } else { + return (T) extension.fromReflectionType(descriptor.getDefaultValue()); + } + } else { + return (T) extension.fromReflectionType(value); + } + } + + /** Get one element of a repeated extension. */ + @Override + @SuppressWarnings("unchecked") + public final T getExtension( + final ExtensionLite> extensionLite, final int index) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + FieldDescriptor descriptor = extension.getDescriptor(); + return (T) + extension.singularFromReflectionType(extensions.getRepeatedField(descriptor, index)); + } + + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + @Override + public final boolean hasExtension(final Extension extension) { + return hasExtension((ExtensionLite) extension); + } + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + @Override + public final boolean hasExtension( + final GeneratedExtension extension) { + return hasExtension((ExtensionLite) extension); + } + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final int getExtensionCount( + final Extension> extension) { + return getExtensionCount((ExtensionLite>) extension); + } + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final int getExtensionCount( + final GeneratedExtension> extension) { + return getExtensionCount((ExtensionLite>) extension); + } + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension(final Extension extension) { + return getExtension((ExtensionLite) extension); + } + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final GeneratedExtension extension) { + return getExtension((ExtensionLite) extension); + } + /** + * Get one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final Extension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); + } + /** + * Get one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final GeneratedExtension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); + } + + /** Called by subclasses to check if all extensions are initialized. */ + protected boolean extensionsAreInitialized() { + return extensions.isInitialized(); + } + + // TODO: compute this in the builder at {@code build()} time. + @Override + public boolean isInitialized() { + return super.isInitialized() && extensionsAreInitialized(); + } + + // TODO: remove mutating method from immutable type + @Override + protected boolean parseUnknownField( + CodedInputStream input, + UnknownFieldSet.Builder unknownFields, + ExtensionRegistryLite extensionRegistry, + int tag) + throws IOException { + return MessageReflection.mergeFieldFrom( + input, + input.shouldDiscardUnknownFields() ? null : unknownFields, + extensionRegistry, + getDescriptorForType(), + new MessageReflection.ExtensionAdapter(extensions), + tag); + } + + /** + * Delegates to parseUnknownField. This method is obsolete, but we must retain it for + * compatibility with older generated code. + * + *

TODO: remove mutating method from immutable type + */ + @Override + protected boolean parseUnknownFieldProto3( + CodedInputStream input, + UnknownFieldSet.Builder unknownFields, + ExtensionRegistryLite extensionRegistry, + int tag) + throws IOException { + return parseUnknownField(input, unknownFields, extensionRegistry, tag); + } + + /** + * Used by parsing constructors in generated classes. + * + *

TODO: remove unused method (extensions should be immutable after build) + */ + @Override + protected void makeExtensionsImmutable() { + extensions.makeImmutable(); + } + + /** + * Used by subclasses to serialize extensions. Extension ranges may be interleaved with field + * numbers, but we must write them in canonical (sorted by field number) order. ExtensionWriter + * helps us write individual ranges of extensions at once. + */ + protected class ExtensionWriter { + // Imagine how much simpler this code would be if Java iterators had + // a way to get the next element without advancing the iterator. + + private final Iterator> iter = extensions.iterator(); + private Map.Entry next; + private final boolean messageSetWireFormat; + + private ExtensionWriter(final boolean messageSetWireFormat) { + if (iter.hasNext()) { + next = iter.next(); + } + this.messageSetWireFormat = messageSetWireFormat; + } + + public void writeUntil(final int end, final CodedOutputStream output) throws IOException { + while (next != null && next.getKey().getNumber() < end) { + FieldDescriptor descriptor = next.getKey(); + if (messageSetWireFormat + && descriptor.getLiteJavaType() == WireFormat.JavaType.MESSAGE + && !descriptor.isRepeated()) { + if (next instanceof LazyField.LazyEntry) { + output.writeRawMessageSetExtension( + descriptor.getNumber(), + ((LazyField.LazyEntry) next).getField().toByteString()); + } else { + output.writeMessageSetExtension(descriptor.getNumber(), (Message) next.getValue()); + } + } else { + // TODO: Taken care of following code, it may cause + // problem when we use LazyField for normal fields/extensions. + // Due to the optional field can be duplicated at the end of + // serialized bytes, which will make the serialized size change + // after lazy field parsed. So when we use LazyField globally, + // we need to change the following write method to write cached + // bytes directly rather than write the parsed message. + FieldSet.writeField(descriptor, next.getValue(), output); + } + if (iter.hasNext()) { + next = iter.next(); + } else { + next = null; + } + } + } + } + + protected ExtensionWriter newExtensionWriter() { + return new ExtensionWriter(false); + } + + protected ExtensionWriter newMessageSetExtensionWriter() { + return new ExtensionWriter(true); + } + + /** Called by subclasses to compute the size of extensions. */ + protected int extensionsSerializedSize() { + return extensions.getSerializedSize(); + } + + protected int extensionsSerializedSizeAsMessageSet() { + return extensions.getMessageSetSerializedSize(); + } + + // --------------------------------------------------------------- + // Reflection + + protected Map getExtensionFields() { + return extensions.getAllFields(); + } + + @Override + public Map getAllFields() { + final Map result = + super.getAllFieldsMutable(/* getBytesForString= */ false); + result.putAll(getExtensionFields()); + return Collections.unmodifiableMap(result); + } + + @Override + public Map getAllFieldsRaw() { + final Map result = + super.getAllFieldsMutable(/* getBytesForString= */ false); + result.putAll(getExtensionFields()); + return Collections.unmodifiableMap(result); + } + + @Override + public boolean hasField(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + return extensions.hasField(field); + } else { + return super.hasField(field); + } + } + + @Override + public Object getField(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + final Object value = extensions.getField(field); + if (value == null) { + if (field.isRepeated()) { + return Collections.emptyList(); + } else if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + // Lacking an ExtensionRegistry, we have no way to determine the + // extension's real type, so we return a DynamicMessage. + return DynamicMessage.getDefaultInstance(field.getMessageType()); + } else { + return field.getDefaultValue(); + } + } else { + return value; + } + } else { + return super.getField(field); + } + } + + @Override + public int getRepeatedFieldCount(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + return extensions.getRepeatedFieldCount(field); + } else { + return super.getRepeatedFieldCount(field); + } + } + + @Override + public Object getRepeatedField(final FieldDescriptor field, final int index) { + if (field.isExtension()) { + verifyContainingType(field); + return extensions.getRepeatedField(field, index); + } else { + return super.getRepeatedField(field, index); + } + } + + private void verifyContainingType(final FieldDescriptor field) { + if (field.getContainingType() != getDescriptorForType()) { + throw new IllegalArgumentException("FieldDescriptor does not match message type."); + } + } + } + + /** + * Type used to represent generated extensions. The protocol compiler generates a static singleton + * instance of this class for each extension. + * + *

For example, imagine you have the {@code .proto} file: + * + *

+   * option java_class = "MyProto";
+   *
+   * message Foo {
+   *   extensions 1000 to max;
+   * }
+   *
+   * extend Foo {
+   *   optional int32 bar;
+   * }
+   * 
+ * + *

Then, {@code MyProto.Foo.bar} has type {@code GeneratedExtension}. + * + *

In general, users should ignore the details of this type, and simply use these static + * singletons as parameters to the extension accessors defined in {@link GeneratedMessage.ExtendableMessage} and + * {@link GeneratedMessage.ExtendableBuilder}. + */ + public static class GeneratedExtension + extends Extension { + // TODO: Find ways to avoid using Java reflection within this + // class. Also try to avoid suppressing unchecked warnings. + + // We can't always initialize the descriptor of a GeneratedExtension when + // we first construct it due to initialization order difficulties (namely, + // the descriptor may not have been constructed yet, since it is often + // constructed by the initializer of a separate module). + // + // In the case of nested extensions, we initialize the + // ExtensionDescriptorRetriever with an instance that uses the scoping + // Message's default instance to retrieve the extension's descriptor. + // + // In the case of non-nested extensions, we initialize the + // ExtensionDescriptorRetriever to null and rely on the outer class's static + // initializer to call internalInit() after the descriptor has been parsed. + GeneratedExtension( + ExtensionDescriptorRetriever descriptorRetriever, + Class singularType, + Message messageDefaultInstance, + ExtensionType extensionType) { + if (Message.class.isAssignableFrom(singularType) + && !singularType.isInstance(messageDefaultInstance)) { + throw new IllegalArgumentException( + "Bad messageDefaultInstance for " + singularType.getName()); + } + this.descriptorRetriever = descriptorRetriever; + this.singularType = singularType; + this.messageDefaultInstance = messageDefaultInstance; + + if (ProtocolMessageEnum.class.isAssignableFrom(singularType)) { + this.enumValueOf = getMethodOrDie(singularType, "valueOf", EnumValueDescriptor.class); + this.enumGetValueDescriptor = getMethodOrDie(singularType, "getValueDescriptor"); + } else { + this.enumValueOf = null; + this.enumGetValueDescriptor = null; + } + this.extensionType = extensionType; + } + + /** For use by generated code only. */ + public void internalInit(final FieldDescriptor descriptor) { + if (descriptorRetriever != null) { + throw new IllegalStateException("Already initialized."); + } + descriptorRetriever = + new ExtensionDescriptorRetriever() { + @Override + public FieldDescriptor getDescriptor() { + return descriptor; + } + }; + } + + /** + * Gets the descriptor for an extension. The implementation depends on whether the extension is + * scoped in the top level of a file or scoped in a Message. + */ + static interface ExtensionDescriptorRetriever { + FieldDescriptor getDescriptor(); + } + + private ExtensionDescriptorRetriever descriptorRetriever; + private final Class singularType; + private final Message messageDefaultInstance; + private final Method enumValueOf; + private final Method enumGetValueDescriptor; + private final ExtensionType extensionType; + + @Override + public FieldDescriptor getDescriptor() { + if (descriptorRetriever == null) { + throw new IllegalStateException("getDescriptor() called before internalInit()"); + } + return descriptorRetriever.getDescriptor(); + } + + /** + * If the extension is an embedded message or group, returns the default instance of the + * message. + */ + @Override + public Message getMessageDefaultInstance() { + return messageDefaultInstance; + } + + @Override + protected ExtensionType getExtensionType() { + return extensionType; + } + + /** + * Convert from the type used by the reflection accessors to the type used by native accessors. + * E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors + * use the generated enum type. + */ + @Override + @SuppressWarnings("unchecked") + protected Object fromReflectionType(final Object value) { + FieldDescriptor descriptor = getDescriptor(); + if (descriptor.isRepeated()) { + if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE + || descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { + // Must convert the whole list. + final List result = new ArrayList(); + for (final Object element : (List) value) { + result.add(singularFromReflectionType(element)); + } + return result; + } else { + return value; + } + } else { + return singularFromReflectionType(value); + } + } + + /** + * Like {@link #fromReflectionType(Object)}, but if the type is a repeated type, this converts a + * single element. + */ + @Override + protected Object singularFromReflectionType(final Object value) { + FieldDescriptor descriptor = getDescriptor(); + switch (descriptor.getJavaType()) { + case MESSAGE: + if (singularType.isInstance(value)) { + return value; + } else { + return messageDefaultInstance.newBuilderForType().mergeFrom((Message) value).build(); + } + case ENUM: + return invokeOrDie(enumValueOf, null, (EnumValueDescriptor) value); + default: + return value; + } + } + + /** + * Convert from the type used by the native accessors to the type used by reflection accessors. + * E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors + * use the generated enum type. + */ + @Override + @SuppressWarnings("unchecked") + protected Object toReflectionType(final Object value) { + FieldDescriptor descriptor = getDescriptor(); + if (descriptor.isRepeated()) { + if (descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { + // Must convert the whole list. + final List result = new ArrayList(); + for (final Object element : (List) value) { + result.add(singularToReflectionType(element)); + } + return result; + } else { + return value; + } + } else { + return singularToReflectionType(value); + } + } + + /** + * Like {@link #toReflectionType(Object)}, but if the type is a repeated type, this converts a + * single element. + */ + @Override + protected Object singularToReflectionType(final Object value) { + FieldDescriptor descriptor = getDescriptor(); + switch (descriptor.getJavaType()) { + case ENUM: + return invokeOrDie(enumGetValueDescriptor, value); + default: + return value; + } + } + + @Override + public int getNumber() { + return getDescriptor().getNumber(); + } + + @Override + public WireFormat.FieldType getLiteType() { + return getDescriptor().getLiteType(); + } + + @Override + public boolean isRepeated() { + return getDescriptor().isRepeated(); + } + + @Override + @SuppressWarnings("unchecked") + public Type getDefaultValue() { + if (isRepeated()) { + return (Type) Collections.emptyList(); + } + if (getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + return (Type) messageDefaultInstance; + } + return (Type) singularFromReflectionType(getDescriptor().getDefaultValue()); + } + } + + + /** + * Generated message builders for message types that contain extension ranges subclass this. + * + *

This class implements type-safe accessors for extensions. They implement all the same + * operations that you can do with normal fields -- e.g. "get", "set", and "add" -- but for + * extensions. The extensions are identified using instances of the class {@link + * GeneratedExtension}; the protocol compiler generates a static instance of this class for every + * extension in its input. Through the magic of generics, all is made type-safe. + * + *

For example, imagine you have the {@code .proto} file: + * + *

+   * option java_class = "MyProto";
+   *
+   * message Foo {
+   *   extensions 1000 to max;
+   * }
+   *
+   * extend Foo {
+   *   optional int32 bar;
+   * }
+   * 
+ * + *

Then you might write code like: + * + *

+   * MyProto.Foo foo =
+   *   MyProto.Foo.newBuilder()
+   *     .setExtension(MyProto.bar, 123)
+   *     .build();
+   * 
+ * + *

See also {@link ExtendableMessage}. + */ + @SuppressWarnings("unchecked") + public abstract static class ExtendableBuilder< + MessageT extends ExtendableMessage, + BuilderT extends ExtendableBuilder> + extends Builder implements ExtendableMessageOrBuilder { + + private FieldSet.Builder extensions; + + protected ExtendableBuilder() {} + + protected ExtendableBuilder(BuilderParent parent) { + super(parent); + } + + // For immutable message conversion. + void internalSetExtensionSet(FieldSet extensions) { + this.extensions = FieldSet.Builder.fromFieldSet(extensions); + } + + @Override + public BuilderT clear() { + extensions = null; + return super.clear(); + } + + private void ensureExtensionsIsMutable() { + if (extensions == null) { + extensions = FieldSet.newBuilder(); + } + } + + private void verifyExtensionContainingType(final Extension extension) { + if (extension.getDescriptor().getContainingType() != getDescriptorForType()) { + // This can only happen if someone uses unchecked operations. + throw new IllegalArgumentException( + "Extension is for type \"" + + extension.getDescriptor().getContainingType().getFullName() + + "\" which does not match message type \"" + + getDescriptorForType().getFullName() + + "\"."); + } + } + + /** Check if a singular extension is present. */ + @Override + public final boolean hasExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + return extensions != null && extensions.hasField(extension.getDescriptor()); + } + + /** Get the number of elements in a repeated extension. */ + @Override + public final int getExtensionCount(final ExtensionLite> extensionLite) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + final FieldDescriptor descriptor = extension.getDescriptor(); + return extensions == null ? 0 : extensions.getRepeatedFieldCount(descriptor); + } + + /** Get the value of an extension. */ + @Override + public final T getExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + FieldDescriptor descriptor = extension.getDescriptor(); + final Object value = extensions == null ? null : extensions.getField(descriptor); + if (value == null) { + if (descriptor.isRepeated()) { + return (T) Collections.emptyList(); + } else if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + return (T) extension.getMessageDefaultInstance(); + } else { + return (T) extension.fromReflectionType(descriptor.getDefaultValue()); + } + } else { + return (T) extension.fromReflectionType(value); + } + } + + /** Get one element of a repeated extension. */ + @Override + public final T getExtension( + final ExtensionLite> extensionLite, final int index) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + FieldDescriptor descriptor = extension.getDescriptor(); + if (extensions == null) { + throw new IndexOutOfBoundsException(); + } + return (T) + extension.singularFromReflectionType(extensions.getRepeatedField(descriptor, index)); + } + + /** Set the value of an extension. */ + public final BuilderT setExtension( + final ExtensionLite extensionLite, final T value) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + ensureExtensionsIsMutable(); + final FieldDescriptor descriptor = extension.getDescriptor(); + extensions.setField(descriptor, extension.toReflectionType(value)); + onChanged(); + return (BuilderT) this; + } + + /** Set the value of one element of a repeated extension. */ + public final BuilderT setExtension( + final ExtensionLite> extensionLite, final int index, final T value) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + ensureExtensionsIsMutable(); + final FieldDescriptor descriptor = extension.getDescriptor(); + extensions.setRepeatedField(descriptor, index, extension.singularToReflectionType(value)); + onChanged(); + return (BuilderT) this; + } + + /** Append a value to a repeated extension. */ + public final BuilderT addExtension( + final ExtensionLite> extensionLite, final T value) { + Extension> extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + ensureExtensionsIsMutable(); + final FieldDescriptor descriptor = extension.getDescriptor(); + extensions.addRepeatedField(descriptor, extension.singularToReflectionType(value)); + onChanged(); + return (BuilderT) this; + } + + /** Clear an extension. */ + public final BuilderT clearExtension(final ExtensionLite extensionLite) { + Extension extension = checkNotLite(extensionLite); + + verifyExtensionContainingType(extension); + ensureExtensionsIsMutable(); + extensions.clearField(extension.getDescriptor()); + onChanged(); + return (BuilderT) this; + } + + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + @Override + public final boolean hasExtension(final Extension extension) { + return hasExtension((ExtensionLite) extension); + } + /** + * Check if a singular extension is present. + *

TODO: handled by ExtensionLite version + */ + @Override + public final boolean hasExtension( + final FlattenedGeneratedMessageV3.GeneratedExtension extension) { + return hasExtension((ExtensionLite) extension); + } + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final int getExtensionCount( + final Extension> extension) { + return getExtensionCount((ExtensionLite>) extension); + } + /** + * Get the number of elements in a repeated extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final int getExtensionCount( + final FlattenedGeneratedMessageV3.GeneratedExtension> extension) { + return getExtensionCount((ExtensionLite>) extension); + } + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension(final Extension extension) { + return getExtension((ExtensionLite) extension); + } + /** Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final GeneratedExtension extension) { + return getExtension((ExtensionLite) extension); + } + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final Extension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); + } + /** + * Get the value of an extension. + *

TODO: handled by ExtensionLite version + */ + @Override + public final T getExtension( + final GeneratedExtension> extension, final int index) { + return getExtension((ExtensionLite>) extension, index); + } + /** + * Set the value of an extension. + *

TODO: handled by ExtensionLite version + */ + public final BuilderT setExtension( + final Extension extension, final T value) { + return setExtension((ExtensionLite) extension, value); + } + /** + * Set the value of an extension. + *

TODO: handled by ExtensionLite version + */ + public BuilderT setExtension( + final GeneratedExtension extension, final T value) { + return setExtension((ExtensionLite) extension, value); + } + /** + * Set the value of one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + public final BuilderT setExtension( + final Extension> extension, + final int index, final T value) { + return setExtension((ExtensionLite>) extension, index, value); + } + /** + * Set the value of one element of a repeated extension. + *

TODO: handled by ExtensionLite version + */ + public BuilderT setExtension( + final GeneratedExtension> extension, + final int index, final T value) { + return setExtension((ExtensionLite>) extension, index, value); + } + /** + * Append a value to a repeated extension. + *

TODO: handled by ExtensionLite version + */ + public final BuilderT addExtension( + final Extension> extension, final T value) { + return addExtension((ExtensionLite>) extension, value); + } + /** + * Append a value to a repeated extension. + *

TODO: handled by ExtensionLite version + */ + public BuilderT addExtension( + final GeneratedExtension> extension, final T value) { + return addExtension((ExtensionLite>) extension, value); + } + /** + * Clear an extension. + *

TODO: handled by ExtensionLite version + */ + public final BuilderT clearExtension( + final Extension extension) { + return clearExtension((ExtensionLite) extension); + } + /** + * Clears an extension. + *

TODO: handled by ExtensionLite version + */ + public BuilderT clearExtension( + final GeneratedExtension extension) { + return clearExtension((ExtensionLite) extension); + } + + /** Called by subclasses to check if all extensions are initialized. */ + protected boolean extensionsAreInitialized() { + return extensions == null || extensions.isInitialized(); + } + + /** + * Called by the build code path to create a copy of the extensions for building the message. + */ + private FieldSet buildExtensions() { + return extensions == null + ? (FieldSet) FieldSet.emptySet() + : extensions.buildPartial(); + } + + @Override + public boolean isInitialized() { + return super.isInitialized() && extensionsAreInitialized(); + } + + // --------------------------------------------------------------- + // Reflection + + @Override + public Map getAllFields() { + final Map result = super.getAllFieldsMutable(); + if (extensions != null) { + result.putAll(extensions.getAllFields()); + } + return Collections.unmodifiableMap(result); + } + + @Override + public Object getField(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + final Object value = extensions == null ? null : extensions.getField(field); + if (value == null) { + if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + // Lacking an ExtensionRegistry, we have no way to determine the + // extension's real type, so we return a DynamicMessage. + return DynamicMessage.getDefaultInstance(field.getMessageType()); + } else { + return field.getDefaultValue(); + } + } else { + return value; + } + } else { + return super.getField(field); + } + } + + @Override + public Message.Builder getFieldBuilder(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + if (field.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { + throw new UnsupportedOperationException( + "getFieldBuilder() called on a non-Message type."); + } + ensureExtensionsIsMutable(); + final Object value = extensions.getFieldAllowBuilders(field); + if (value == null) { + Message.Builder builder = DynamicMessage.newBuilder(field.getMessageType()); + extensions.setField(field, builder); + onChanged(); + return builder; + } else { + if (value instanceof Message.Builder) { + return (Message.Builder) value; + } else if (value instanceof Message) { + Message.Builder builder = ((Message) value).toBuilder(); + extensions.setField(field, builder); + onChanged(); + return builder; + } else { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on a non-Message type."); + } + } + } else { + return super.getFieldBuilder(field); + } + } + + @Override + public int getRepeatedFieldCount(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + return extensions == null ? 0 : extensions.getRepeatedFieldCount(field); + } else { + return super.getRepeatedFieldCount(field); + } + } + + @Override + public Object getRepeatedField(final FieldDescriptor field, final int index) { + if (field.isExtension()) { + verifyContainingType(field); + if (extensions == null) { + throw new IndexOutOfBoundsException(); + } + return extensions.getRepeatedField(field, index); + } else { + return super.getRepeatedField(field, index); + } + } + + @Override + public Message.Builder getRepeatedFieldBuilder(final FieldDescriptor field, final int index) { + if (field.isExtension()) { + verifyContainingType(field); + ensureExtensionsIsMutable(); + if (field.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on a non-Message type."); + } + final Object value = extensions.getRepeatedFieldAllowBuilders(field, index); + if (value instanceof Message.Builder) { + return (Message.Builder) value; + } else if (value instanceof Message) { + Message.Builder builder = ((Message) value).toBuilder(); + extensions.setRepeatedField(field, index, builder); + onChanged(); + return builder; + } else { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on a non-Message type."); + } + } else { + return super.getRepeatedFieldBuilder(field, index); + } + } + + @Override + public boolean hasField(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + return extensions != null && extensions.hasField(field); + } else { + return super.hasField(field); + } + } + + @Override + public BuilderT setField(final FieldDescriptor field, final Object value) { + if (field.isExtension()) { + verifyContainingType(field); + ensureExtensionsIsMutable(); + extensions.setField(field, value); + onChanged(); + return (BuilderT) this; + } else { + return super.setField(field, value); + } + } + + @Override + public BuilderT clearField(final FieldDescriptor field) { + if (field.isExtension()) { + verifyContainingType(field); + ensureExtensionsIsMutable(); + extensions.clearField(field); + onChanged(); + return (BuilderT) this; + } else { + return super.clearField(field); + } + } + + @Override + public BuilderT setRepeatedField( + final FieldDescriptor field, final int index, final Object value) { + if (field.isExtension()) { + verifyContainingType(field); + ensureExtensionsIsMutable(); + extensions.setRepeatedField(field, index, value); + onChanged(); + return (BuilderT) this; + } else { + return super.setRepeatedField(field, index, value); + } + } + + @Override + public BuilderT addRepeatedField(final FieldDescriptor field, final Object value) { + if (field.isExtension()) { + verifyContainingType(field); + ensureExtensionsIsMutable(); + extensions.addRepeatedField(field, value); + onChanged(); + return (BuilderT) this; + } else { + return super.addRepeatedField(field, value); + } + } + + @Override + public Message.Builder newBuilderForField(final FieldDescriptor field) { + if (field.isExtension()) { + return DynamicMessage.newBuilder(field.getMessageType()); + } else { + return super.newBuilderForField(field); + } + } + + protected final void mergeExtensionFields(final ExtendableMessage other) { + if (other.extensions != null) { + ensureExtensionsIsMutable(); + extensions.mergeFrom(other.extensions); + onChanged(); + } + } + + @Override + protected boolean parseUnknownField( + CodedInputStream input, ExtensionRegistryLite extensionRegistry, int tag) + throws IOException { + ensureExtensionsIsMutable(); + return MessageReflection.mergeFieldFrom( + input, + input.shouldDiscardUnknownFields() ? null : getUnknownFieldSetBuilder(), + extensionRegistry, + getDescriptorForType(), + new MessageReflection.ExtensionBuilderAdapter(extensions), + tag); + } + + private void verifyContainingType(final FieldDescriptor field) { + if (field.getContainingType() != getDescriptorForType()) { + throw new IllegalArgumentException("FieldDescriptor does not match message type."); + } + } + } + + // ----------------------------------------------------------------- + + /** + * Gets the descriptor for an extension. The implementation depends on whether the extension is + * scoped in the top level of a file or scoped in a Message. + */ + interface ExtensionDescriptorRetriever { + FieldDescriptor getDescriptor(); + } + + // ================================================================= + + /** Calls Class.getMethod and throws a RuntimeException if it fails. */ + private static Method getMethodOrDie( + final Class clazz, final String name, final Class... params) { + try { + return clazz.getMethod(name, params); + } catch (NoSuchMethodException e) { + throw new IllegalStateException( + "Generated message class \"" + clazz.getName() + "\" missing method \"" + name + "\".", + e); + } + } + + /** Calls invoke and throws a RuntimeException if it fails. */ + @CanIgnoreReturnValue + private static Object invokeOrDie( + final Method method, final Object object, final Object... params) { + try { + return method.invoke(object, params); + } catch (IllegalAccessException e) { + throw new IllegalStateException( + "Couldn't use Java reflection to implement protocol message reflection.", e); + } catch (InvocationTargetException e) { + final Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) cause; + } else if (cause instanceof Error) { + throw (Error) cause; + } else { + throw new IllegalStateException( + "Unexpected exception thrown by generated accessor method.", cause); + } + } + } + + /** + * Gets the map field with the given field number. This method should be overridden in the + * generated message class if the message contains map fields. + * + *

Unlike other field types, reflection support for map fields can't be implemented based on + * generated public API because we need to access a map field as a list in reflection API but the + * generated API only allows us to access it as a map. This method returns the underlying map + * field directly and thus enables us to access the map field as a list. + */ + @SuppressWarnings("unused") + protected MapFieldReflectionAccessor internalGetMapFieldReflection(int fieldNumber) { + return internalGetMapField(fieldNumber); + } + + /** TODO: Remove, exists for compatibility with generated code. */ + @Deprecated + @SuppressWarnings({"rawtypes", "unused"}) + protected MapField internalGetMapField(int fieldNumber) { + // Note that we can't use descriptor names here because this method will + // be called when descriptor is being initialized. + throw new IllegalArgumentException("No map fields found in " + getClass().getName()); + } + + /** + * Users should ignore this class. This class provides the implementation with access to the + * fields of a message object using Java reflection. + */ + public static final class FieldAccessorTable { + + /** + * Construct a FieldAccessorTable for a particular message class. Only one FieldAccessorTable + * should ever be constructed per class. + * + * @param descriptor The type's descriptor. + * @param camelCaseNames The camelcase names of all fields in the message. These are used to + * derive the accessor method names. + * @param messageClass The message type. + * @param builderClass The builder type. + */ + public FieldAccessorTable( + final Descriptor descriptor, + final String[] camelCaseNames, + final Class messageClass, + final Class> builderClass) { + this(descriptor, camelCaseNames); + ensureFieldAccessorsInitialized(messageClass, builderClass); + } + + /** + * Construct a FieldAccessorTable for a particular message class without initializing + * FieldAccessors. + */ + public FieldAccessorTable(final Descriptor descriptor, final String[] camelCaseNames) { + this.descriptor = descriptor; + this.camelCaseNames = camelCaseNames; + fields = new FieldAccessor[descriptor.getFields().size()]; + oneofs = new OneofAccessor[descriptor.getOneofs().size()]; + initialized = false; + } + + /** + * Ensures the field accessors are initialized. This method is thread-safe. + * + * @param messageClass The message type. + * @param builderClass The builder type. + * @return this + */ + public FieldAccessorTable ensureFieldAccessorsInitialized( + Class messageClass, Class> builderClass) { + if (initialized) { + return this; + } + synchronized (this) { + if (initialized) { + return this; + } + int fieldsSize = fields.length; + for (int i = 0; i < fieldsSize; i++) { + FieldDescriptor field = descriptor.getFields().get(i); + String containingOneofCamelCaseName = null; + if (field.getContainingOneof() != null) { + int index = fieldsSize + field.getContainingOneof().getIndex(); + if (index < camelCaseNames.length) { + containingOneofCamelCaseName = camelCaseNames[index]; + } + } + if (field.isRepeated()) { + if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + if (field.isMapField()) { + fields[i] = new MapFieldAccessor(field, messageClass); + } else { + fields[i] = + new RepeatedMessageFieldAccessor( + field, camelCaseNames[i], messageClass, builderClass); + } + } else if (field.getJavaType() == FieldDescriptor.JavaType.ENUM) { + fields[i] = + new RepeatedEnumFieldAccessor( + field, camelCaseNames[i], messageClass, builderClass); + } else { + fields[i] = + new RepeatedFieldAccessor(field, camelCaseNames[i], messageClass, builderClass); + } + } else { + if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + fields[i] = + new SingularMessageFieldAccessor( + field, + camelCaseNames[i], + messageClass, + builderClass, + containingOneofCamelCaseName); + } else if (field.getJavaType() == FieldDescriptor.JavaType.ENUM) { + fields[i] = + new SingularEnumFieldAccessor( + field, + camelCaseNames[i], + messageClass, + builderClass, + containingOneofCamelCaseName); + } else if (field.getJavaType() == FieldDescriptor.JavaType.STRING) { + fields[i] = + new SingularStringFieldAccessor( + field, + camelCaseNames[i], + messageClass, + builderClass, + containingOneofCamelCaseName); + } else { + fields[i] = + new SingularFieldAccessor( + field, + camelCaseNames[i], + messageClass, + builderClass, + containingOneofCamelCaseName); + } + } + } + + for (int i = 0; i < descriptor.getOneofs().size(); i++) { + if (i < descriptor.getRealOneofs().size()) { + oneofs[i] = + new RealOneofAccessor( + descriptor, i, camelCaseNames[i + fieldsSize], messageClass, builderClass); + } else { + oneofs[i] = new SyntheticOneofAccessor(descriptor, i); + } + } + + initialized = true; + camelCaseNames = null; + return this; + } + } + + private final Descriptor descriptor; + private final FieldAccessor[] fields; + private String[] camelCaseNames; + private final OneofAccessor[] oneofs; + private volatile boolean initialized; + + /** Get the FieldAccessor for a particular field. */ + private FieldAccessor getField(final FieldDescriptor field) { + if (field.getContainingType() != descriptor) { + throw new IllegalArgumentException("FieldDescriptor does not match message type."); + } else if (field.isExtension()) { + // If this type had extensions, it would subclass ExtendableMessage, + // which overrides the reflection interface to handle extensions. + throw new IllegalArgumentException("This type does not have extensions."); + } + return fields[field.getIndex()]; + } + + /** Get the OneofAccessor for a particular oneof. */ + private OneofAccessor getOneof(final OneofDescriptor oneof) { + if (oneof.getContainingType() != descriptor) { + throw new IllegalArgumentException("OneofDescriptor does not match message type."); + } + return oneofs[oneof.getIndex()]; + } + + /** + * Abstract interface that provides access to a single field. This is implemented differently + * depending on the field type and cardinality. + */ + private interface FieldAccessor { + Object get(FlattenedGeneratedMessageV3 message); + + Object get(FlattenedGeneratedMessageV3.Builder builder); + + Object getRaw(FlattenedGeneratedMessageV3 message); + + void set(Builder builder, Object value); + + Object getRepeated(FlattenedGeneratedMessageV3 message, int index); + + Object getRepeated(FlattenedGeneratedMessageV3.Builder builder, int index); + + void setRepeated(Builder builder, int index, Object value); + + void addRepeated(Builder builder, Object value); + + boolean has(FlattenedGeneratedMessageV3 message); + + boolean has(FlattenedGeneratedMessageV3.Builder builder); + + int getRepeatedCount(FlattenedGeneratedMessageV3 message); + + int getRepeatedCount(FlattenedGeneratedMessageV3.Builder builder); + + void clear(Builder builder); + + Message.Builder newBuilder(); + + Message.Builder getBuilder(FlattenedGeneratedMessageV3.Builder builder); + + Message.Builder getRepeatedBuilder(FlattenedGeneratedMessageV3.Builder builder, int index); + } + + /** OneofAccessor provides access to a single oneof. */ + private static interface OneofAccessor { + public boolean has(final FlattenedGeneratedMessageV3 message); + + public boolean has(FlattenedGeneratedMessageV3.Builder builder); + + public FieldDescriptor get(final FlattenedGeneratedMessageV3 message); + + public FieldDescriptor get(FlattenedGeneratedMessageV3.Builder builder); + + public void clear(final Builder builder); + } + + /** RealOneofAccessor provides access to a single real oneof. */ + private static class RealOneofAccessor implements OneofAccessor { + RealOneofAccessor( + final Descriptor descriptor, + final int oneofIndex, + final String camelCaseName, + final Class messageClass, + final Class> builderClass) { + this.descriptor = descriptor; + caseMethod = getMethodOrDie(messageClass, "get" + camelCaseName + "Case"); + caseMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName + "Case"); + clearMethod = getMethodOrDie(builderClass, "clear" + camelCaseName); + } + + private final Descriptor descriptor; + private final Method caseMethod; + private final Method caseMethodBuilder; + private final Method clearMethod; + + @Override + public boolean has(final FlattenedGeneratedMessageV3 message) { + return ((Internal.EnumLite) invokeOrDie(caseMethod, message)).getNumber() != 0; + } + + @Override + public boolean has(FlattenedGeneratedMessageV3.Builder builder) { + return ((Internal.EnumLite) invokeOrDie(caseMethodBuilder, builder)).getNumber() != 0; + } + + @Override + public FieldDescriptor get(final FlattenedGeneratedMessageV3 message) { + int fieldNumber = ((Internal.EnumLite) invokeOrDie(caseMethod, message)).getNumber(); + if (fieldNumber > 0) { + return descriptor.findFieldByNumber(fieldNumber); + } + return null; + } + + @Override + public FieldDescriptor get(FlattenedGeneratedMessageV3.Builder builder) { + int fieldNumber = ((Internal.EnumLite) invokeOrDie(caseMethodBuilder, builder)).getNumber(); + if (fieldNumber > 0) { + return descriptor.findFieldByNumber(fieldNumber); + } + return null; + } + + @Override + public void clear(final Builder builder) { + // TODO: remove the unused variable + Object unused = invokeOrDie(clearMethod, builder); + } + } + + /** SyntheticOneofAccessor provides access to a single synthetic oneof. */ + private static class SyntheticOneofAccessor implements OneofAccessor { + SyntheticOneofAccessor(final Descriptor descriptor, final int oneofIndex) { + OneofDescriptor oneofDescriptor = descriptor.getOneofs().get(oneofIndex); + fieldDescriptor = oneofDescriptor.getFields().get(0); + } + + private final FieldDescriptor fieldDescriptor; + + @Override + public boolean has(final FlattenedGeneratedMessageV3 message) { + return message.hasField(fieldDescriptor); + } + + @Override + public boolean has(FlattenedGeneratedMessageV3.Builder builder) { + return builder.hasField(fieldDescriptor); + } + + @Override + public FieldDescriptor get(final FlattenedGeneratedMessageV3 message) { + return message.hasField(fieldDescriptor) ? fieldDescriptor : null; + } + + public FieldDescriptor get(FlattenedGeneratedMessageV3.Builder builder) { + return builder.hasField(fieldDescriptor) ? fieldDescriptor : null; + } + + @Override + public void clear(final Builder builder) { + builder.clearField(fieldDescriptor); + } + } + + // --------------------------------------------------------------- + + @SuppressWarnings("SameNameButDifferent") + private static class SingularFieldAccessor implements FieldAccessor { + private interface MethodInvoker { + Object get(final FlattenedGeneratedMessageV3 message); + + Object get(FlattenedGeneratedMessageV3.Builder builder); + + int getOneofFieldNumber(final FlattenedGeneratedMessageV3 message); + + int getOneofFieldNumber(final FlattenedGeneratedMessageV3.Builder builder); + + void set(final FlattenedGeneratedMessageV3.Builder builder, final Object value); + + boolean has(final FlattenedGeneratedMessageV3 message); + + boolean has(FlattenedGeneratedMessageV3.Builder builder); + + void clear(final FlattenedGeneratedMessageV3.Builder builder); + } + + private static final class ReflectionInvoker implements MethodInvoker { + private final Method getMethod; + private final Method getMethodBuilder; + private final Method setMethod; + private final Method hasMethod; + private final Method hasMethodBuilder; + private final Method clearMethod; + private final Method caseMethod; + private final Method caseMethodBuilder; + + ReflectionInvoker( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass, + final String containingOneofCamelCaseName, + boolean isOneofField, + boolean hasHasMethod) { + getMethod = getMethodOrDie(messageClass, "get" + camelCaseName); + getMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName); + Class type = getMethod.getReturnType(); + setMethod = getMethodOrDie(builderClass, "set" + camelCaseName, type); + hasMethod = hasHasMethod ? getMethodOrDie(messageClass, "has" + camelCaseName) : null; + hasMethodBuilder = + hasHasMethod ? getMethodOrDie(builderClass, "has" + camelCaseName) : null; + clearMethod = getMethodOrDie(builderClass, "clear" + camelCaseName); + caseMethod = + isOneofField + ? getMethodOrDie(messageClass, "get" + containingOneofCamelCaseName + "Case") + : null; + caseMethodBuilder = + isOneofField + ? getMethodOrDie(builderClass, "get" + containingOneofCamelCaseName + "Case") + : null; + } + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + return invokeOrDie(getMethod, message); + } + + @Override + public Object get(FlattenedGeneratedMessageV3.Builder builder) { + return invokeOrDie(getMethodBuilder, builder); + } + + @Override + public int getOneofFieldNumber(final FlattenedGeneratedMessageV3 message) { + return ((Internal.EnumLite) invokeOrDie(caseMethod, message)).getNumber(); + } + + @Override + public int getOneofFieldNumber(final FlattenedGeneratedMessageV3.Builder builder) { + return ((Internal.EnumLite) invokeOrDie(caseMethodBuilder, builder)).getNumber(); + } + + @Override + public void set(final FlattenedGeneratedMessageV3.Builder builder, final Object value) { + // TODO: remove the unused variable + Object unused = invokeOrDie(setMethod, builder, value); + } + + @Override + public boolean has(final FlattenedGeneratedMessageV3 message) { + return (Boolean) invokeOrDie(hasMethod, message); + } + + @Override + public boolean has(FlattenedGeneratedMessageV3.Builder builder) { + return (Boolean) invokeOrDie(hasMethodBuilder, builder); + } + + @Override + public void clear(final FlattenedGeneratedMessageV3.Builder builder) { + // TODO: remove the unused variable + Object unused = invokeOrDie(clearMethod, builder); + } + } + + SingularFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass, + final String containingOneofCamelCaseName) { + isOneofField = + descriptor.getRealContainingOneof() != null; + hasHasMethod = + descriptor.getFile().getSyntax() == FileDescriptor.Syntax.EDITIONS && descriptor.hasPresence() + || descriptor.getFile().getSyntax() == FileDescriptor.Syntax.PROTO2 + || descriptor.hasOptionalKeyword() + || (!isOneofField && descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE); + ReflectionInvoker reflectionInvoker = + new ReflectionInvoker( + descriptor, + camelCaseName, + messageClass, + builderClass, + containingOneofCamelCaseName, + isOneofField, + hasHasMethod); + field = descriptor; + type = reflectionInvoker.getMethod.getReturnType(); + invoker = getMethodInvoker(reflectionInvoker); + } + + static MethodInvoker getMethodInvoker(ReflectionInvoker accessor) { + return accessor; + } + + // Note: We use Java reflection to call public methods rather than + // access private fields directly as this avoids runtime security + // checks. + protected final Class type; + protected final FieldDescriptor field; + protected final boolean isOneofField; + protected final boolean hasHasMethod; + protected final MethodInvoker invoker; + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + return invoker.get(message); + } + + @Override + public Object get(FlattenedGeneratedMessageV3.Builder builder) { + return invoker.get(builder); + } + + @Override + public Object getRaw(final FlattenedGeneratedMessageV3 message) { + return get(message); + } + + @Override + public void set(final Builder builder, final Object value) { + invoker.set(builder, value); + } + + @Override + public Object getRepeated(final FlattenedGeneratedMessageV3 message, final int index) { + throw new UnsupportedOperationException("getRepeatedField() called on a singular field."); + } + + @Override + public Object getRepeated(FlattenedGeneratedMessageV3.Builder builder, int index) { + throw new UnsupportedOperationException("getRepeatedField() called on a singular field."); + } + + @Override + public void setRepeated(final Builder builder, final int index, final Object value) { + throw new UnsupportedOperationException("setRepeatedField() called on a singular field."); + } + + @Override + public void addRepeated(final Builder builder, final Object value) { + throw new UnsupportedOperationException("addRepeatedField() called on a singular field."); + } + + @Override + public boolean has(final FlattenedGeneratedMessageV3 message) { + if (!hasHasMethod) { + if (isOneofField) { + return invoker.getOneofFieldNumber(message) == field.getNumber(); + } + return !get(message).equals(field.getDefaultValue()); + } + return invoker.has(message); + } + + @Override + public boolean has(FlattenedGeneratedMessageV3.Builder builder) { + if (!hasHasMethod) { + if (isOneofField) { + return invoker.getOneofFieldNumber(builder) == field.getNumber(); + } + return !get(builder).equals(field.getDefaultValue()); + } + return invoker.has(builder); + } + + @Override + public int getRepeatedCount(final FlattenedGeneratedMessageV3 message) { + throw new UnsupportedOperationException( + "getRepeatedFieldSize() called on a singular field."); + } + + @Override + public int getRepeatedCount(FlattenedGeneratedMessageV3.Builder builder) { + throw new UnsupportedOperationException( + "getRepeatedFieldSize() called on a singular field."); + } + + @Override + public void clear(final Builder builder) { + invoker.clear(builder); + } + + @Override + public Message.Builder newBuilder() { + throw new UnsupportedOperationException( + "newBuilderForField() called on a non-Message type."); + } + + @Override + public Message.Builder getBuilder(FlattenedGeneratedMessageV3.Builder builder) { + throw new UnsupportedOperationException("getFieldBuilder() called on a non-Message type."); + } + + @Override + public Message.Builder getRepeatedBuilder(FlattenedGeneratedMessageV3.Builder builder, int index) { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on a non-Message type."); + } + } + + @SuppressWarnings("SameNameButDifferent") + private static class RepeatedFieldAccessor implements FieldAccessor { + interface MethodInvoker { + Object get(final FlattenedGeneratedMessageV3 message); + + Object get(FlattenedGeneratedMessageV3.Builder builder); + + Object getRepeated(final FlattenedGeneratedMessageV3 message, final int index); + + Object getRepeated(FlattenedGeneratedMessageV3.Builder builder, int index); + + void setRepeated( + final FlattenedGeneratedMessageV3.Builder builder, final int index, final Object value); + + void addRepeated(final FlattenedGeneratedMessageV3.Builder builder, final Object value); + + int getRepeatedCount(final FlattenedGeneratedMessageV3 message); + + int getRepeatedCount(FlattenedGeneratedMessageV3.Builder builder); + + void clear(final FlattenedGeneratedMessageV3.Builder builder); + } + + private static final class ReflectionInvoker implements MethodInvoker { + private final Method getMethod; + private final Method getMethodBuilder; + private final Method getRepeatedMethod; + private final Method getRepeatedMethodBuilder; + private final Method setRepeatedMethod; + private final Method addRepeatedMethod; + private final Method getCountMethod; + private final Method getCountMethodBuilder; + private final Method clearMethod; + + ReflectionInvoker( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass) { + getMethod = getMethodOrDie(messageClass, "get" + camelCaseName + "List"); + getMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName + "List"); + getRepeatedMethod = getMethodOrDie(messageClass, "get" + camelCaseName, Integer.TYPE); + getRepeatedMethodBuilder = + getMethodOrDie(builderClass, "get" + camelCaseName, Integer.TYPE); + Class type = getRepeatedMethod.getReturnType(); + setRepeatedMethod = + getMethodOrDie(builderClass, "set" + camelCaseName, Integer.TYPE, type); + addRepeatedMethod = getMethodOrDie(builderClass, "add" + camelCaseName, type); + getCountMethod = getMethodOrDie(messageClass, "get" + camelCaseName + "Count"); + getCountMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName + "Count"); + clearMethod = getMethodOrDie(builderClass, "clear" + camelCaseName); + } + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + return invokeOrDie(getMethod, message); + } + + @Override + public Object get(FlattenedGeneratedMessageV3.Builder builder) { + return invokeOrDie(getMethodBuilder, builder); + } + + @Override + public Object getRepeated(final FlattenedGeneratedMessageV3 message, final int index) { + return invokeOrDie(getRepeatedMethod, message, index); + } + + @Override + public Object getRepeated(FlattenedGeneratedMessageV3.Builder builder, int index) { + return invokeOrDie(getRepeatedMethodBuilder, builder, index); + } + + @Override + public void setRepeated( + final FlattenedGeneratedMessageV3.Builder builder, final int index, final Object value) { + // TODO: remove the unused variable + Object unused = invokeOrDie(setRepeatedMethod, builder, index, value); + } + + @Override + public void addRepeated(final FlattenedGeneratedMessageV3.Builder builder, final Object value) { + // TODO: remove the unused variable + Object unused = invokeOrDie(addRepeatedMethod, builder, value); + } + + @Override + public int getRepeatedCount(final FlattenedGeneratedMessageV3 message) { + return (Integer) invokeOrDie(getCountMethod, message); + } + + @Override + public int getRepeatedCount(FlattenedGeneratedMessageV3.Builder builder) { + return (Integer) invokeOrDie(getCountMethodBuilder, builder); + } + + @Override + public void clear(final FlattenedGeneratedMessageV3.Builder builder) { + // TODO: remove the unused variable + Object unused = invokeOrDie(clearMethod, builder); + } + } + + protected final Class type; + protected final MethodInvoker invoker; + + RepeatedFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass) { + ReflectionInvoker reflectionInvoker = + new ReflectionInvoker(descriptor, camelCaseName, messageClass, builderClass); + type = reflectionInvoker.getRepeatedMethod.getReturnType(); + invoker = getMethodInvoker(reflectionInvoker); + } + + static MethodInvoker getMethodInvoker(ReflectionInvoker accessor) { + return accessor; + } + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + return invoker.get(message); + } + + @Override + public Object get(FlattenedGeneratedMessageV3.Builder builder) { + return invoker.get(builder); + } + + @Override + public Object getRaw(final FlattenedGeneratedMessageV3 message) { + return get(message); + } + + @Override + public void set(final Builder builder, final Object value) { + // Add all the elements individually. This serves two purposes: + // 1) Verifies that each element has the correct type. + // 2) Insures that the caller cannot modify the list later on and + // have the modifications be reflected in the message. + clear(builder); + for (final Object element : (List) value) { + addRepeated(builder, element); + } + } + + @Override + public Object getRepeated(final FlattenedGeneratedMessageV3 message, final int index) { + return invoker.getRepeated(message, index); + } + + @Override + public Object getRepeated(FlattenedGeneratedMessageV3.Builder builder, int index) { + return invoker.getRepeated(builder, index); + } + + @Override + public void setRepeated(final Builder builder, final int index, final Object value) { + invoker.setRepeated(builder, index, value); + } + + @Override + public void addRepeated(final Builder builder, final Object value) { + invoker.addRepeated(builder, value); + } + + @Override + public boolean has(final FlattenedGeneratedMessageV3 message) { + throw new UnsupportedOperationException("hasField() called on a repeated field."); + } + + @Override + public boolean has(FlattenedGeneratedMessageV3.Builder builder) { + throw new UnsupportedOperationException("hasField() called on a repeated field."); + } + + @Override + public int getRepeatedCount(final FlattenedGeneratedMessageV3 message) { + return invoker.getRepeatedCount(message); + } + + @Override + public int getRepeatedCount(FlattenedGeneratedMessageV3.Builder builder) { + return invoker.getRepeatedCount(builder); + } + + @Override + public void clear(final Builder builder) { + invoker.clear(builder); + } + + @Override + public Message.Builder newBuilder() { + throw new UnsupportedOperationException( + "newBuilderForField() called on a non-Message type."); + } + + @Override + public Message.Builder getBuilder(FlattenedGeneratedMessageV3.Builder builder) { + throw new UnsupportedOperationException("getFieldBuilder() called on a non-Message type."); + } + + @Override + public Message.Builder getRepeatedBuilder(FlattenedGeneratedMessageV3.Builder builder, int index) { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on a non-Message type."); + } + } + + private static class MapFieldAccessor implements FieldAccessor { + MapFieldAccessor( + final FieldDescriptor descriptor, final Class messageClass) { + field = descriptor; + Method getDefaultInstanceMethod = getMethodOrDie(messageClass, "getDefaultInstance"); + MapFieldReflectionAccessor defaultMapField = + getMapField((FlattenedGeneratedMessageV3) invokeOrDie(getDefaultInstanceMethod, null)); + mapEntryMessageDefaultInstance = defaultMapField.getMapEntryMessageDefaultInstance(); + } + + private final FieldDescriptor field; + private final Message mapEntryMessageDefaultInstance; + + private MapFieldReflectionAccessor getMapField(FlattenedGeneratedMessageV3 message) { + return message.internalGetMapFieldReflection(field.getNumber()); + } + + private MapFieldReflectionAccessor getMapField(FlattenedGeneratedMessageV3.Builder builder) { + return builder.internalGetMapFieldReflection(field.getNumber()); + } + + private MapFieldReflectionAccessor getMutableMapField(FlattenedGeneratedMessageV3.Builder builder) { + return builder.internalGetMutableMapFieldReflection(field.getNumber()); + } + + private Message coerceType(Message value) { + if (value == null) { + return null; + } + if (mapEntryMessageDefaultInstance.getClass().isInstance(value)) { + return value; + } + // The value is not the exact right message type. However, if it + // is an alternative implementation of the same type -- e.g. a + // DynamicMessage -- we should accept it. In this case we can make + // a copy of the message. + return mapEntryMessageDefaultInstance.toBuilder().mergeFrom(value).build(); + } + + @Override + public Object get(FlattenedGeneratedMessageV3 message) { + List result = new ArrayList<>(); + for (int i = 0; i < getRepeatedCount(message); i++) { + result.add(getRepeated(message, i)); + } + return Collections.unmodifiableList(result); + } + + @Override + public Object get(Builder builder) { + List result = new ArrayList<>(); + for (int i = 0; i < getRepeatedCount(builder); i++) { + result.add(getRepeated(builder, i)); + } + return Collections.unmodifiableList(result); + } + + @Override + public Object getRaw(FlattenedGeneratedMessageV3 message) { + return get(message); + } + + @Override + public void set(Builder builder, Object value) { + clear(builder); + for (Object entry : (List) value) { + addRepeated(builder, entry); + } + } + + @Override + public Object getRepeated(FlattenedGeneratedMessageV3 message, int index) { + return getMapField(message).getList().get(index); + } + + @Override + public Object getRepeated(Builder builder, int index) { + return getMapField(builder).getList().get(index); + } + + @Override + public void setRepeated(Builder builder, int index, Object value) { + getMutableMapField(builder).getMutableList().set(index, coerceType((Message) value)); + } + + @Override + public void addRepeated(Builder builder, Object value) { + getMutableMapField(builder).getMutableList().add(coerceType((Message) value)); + } + + @Override + public boolean has(FlattenedGeneratedMessageV3 message) { + throw new UnsupportedOperationException("hasField() is not supported for repeated fields."); + } + + @Override + public boolean has(Builder builder) { + throw new UnsupportedOperationException("hasField() is not supported for repeated fields."); + } + + @Override + public int getRepeatedCount(FlattenedGeneratedMessageV3 message) { + return getMapField(message).getList().size(); + } + + @Override + public int getRepeatedCount(Builder builder) { + return getMapField(builder).getList().size(); + } + + @Override + public void clear(Builder builder) { + getMutableMapField(builder).getMutableList().clear(); + } + + @Override + public Message.Builder newBuilder() { + return mapEntryMessageDefaultInstance.newBuilderForType(); + } + + @Override + public Message.Builder getBuilder(Builder builder) { + throw new UnsupportedOperationException("Nested builder not supported for map fields."); + } + + @Override + public Message.Builder getRepeatedBuilder(Builder builder, int index) { + throw new UnsupportedOperationException("Map fields cannot be repeated"); + } + } + + // --------------------------------------------------------------- + + private static final class SingularEnumFieldAccessor extends SingularFieldAccessor { + SingularEnumFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass, + final String containingOneofCamelCaseName) { + super(descriptor, camelCaseName, messageClass, builderClass, containingOneofCamelCaseName); + + enumDescriptor = descriptor.getEnumType(); + + valueOfMethod = getMethodOrDie(type, "valueOf", EnumValueDescriptor.class); + getValueDescriptorMethod = getMethodOrDie(type, "getValueDescriptor"); + + supportUnknownEnumValue = !descriptor.legacyEnumFieldTreatedAsClosed(); + if (supportUnknownEnumValue) { + getValueMethod = getMethodOrDie(messageClass, "get" + camelCaseName + "Value"); + getValueMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName + "Value"); + setValueMethod = getMethodOrDie(builderClass, "set" + camelCaseName + "Value", int.class); + } + } + + private final EnumDescriptor enumDescriptor; + + private final Method valueOfMethod; + private final Method getValueDescriptorMethod; + + private final boolean supportUnknownEnumValue; + private Method getValueMethod; + private Method getValueMethodBuilder; + private Method setValueMethod; + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + if (supportUnknownEnumValue) { + int value = (Integer) invokeOrDie(getValueMethod, message); + return enumDescriptor.findValueByNumberCreatingIfUnknown(value); + } + return invokeOrDie(getValueDescriptorMethod, super.get(message)); + } + + @Override + public Object get(final FlattenedGeneratedMessageV3.Builder builder) { + if (supportUnknownEnumValue) { + int value = (Integer) invokeOrDie(getValueMethodBuilder, builder); + return enumDescriptor.findValueByNumberCreatingIfUnknown(value); + } + return invokeOrDie(getValueDescriptorMethod, super.get(builder)); + } + + @Override + public void set(final Builder builder, final Object value) { + if (supportUnknownEnumValue) { + // TODO: remove the unused variable + Object unused = + invokeOrDie(setValueMethod, builder, ((EnumValueDescriptor) value).getNumber()); + return; + } + super.set(builder, invokeOrDie(valueOfMethod, null, value)); + } + } + + private static final class RepeatedEnumFieldAccessor extends RepeatedFieldAccessor { + RepeatedEnumFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass) { + super(descriptor, camelCaseName, messageClass, builderClass); + + enumDescriptor = descriptor.getEnumType(); + + valueOfMethod = getMethodOrDie(type, "valueOf", EnumValueDescriptor.class); + getValueDescriptorMethod = getMethodOrDie(type, "getValueDescriptor"); + + supportUnknownEnumValue = !descriptor.legacyEnumFieldTreatedAsClosed(); + if (supportUnknownEnumValue) { + getRepeatedValueMethod = + getMethodOrDie(messageClass, "get" + camelCaseName + "Value", int.class); + getRepeatedValueMethodBuilder = + getMethodOrDie(builderClass, "get" + camelCaseName + "Value", int.class); + setRepeatedValueMethod = + getMethodOrDie(builderClass, "set" + camelCaseName + "Value", int.class, int.class); + addRepeatedValueMethod = + getMethodOrDie(builderClass, "add" + camelCaseName + "Value", int.class); + } + } + + private final EnumDescriptor enumDescriptor; + + private final Method valueOfMethod; + private final Method getValueDescriptorMethod; + + private final boolean supportUnknownEnumValue; + + private Method getRepeatedValueMethod; + private Method getRepeatedValueMethodBuilder; + private Method setRepeatedValueMethod; + private Method addRepeatedValueMethod; + + @Override + public Object get(final FlattenedGeneratedMessageV3 message) { + final List newList = new ArrayList<>(); + final int size = getRepeatedCount(message); + for (int i = 0; i < size; i++) { + newList.add(getRepeated(message, i)); + } + return Collections.unmodifiableList(newList); + } + + @Override + public Object get(final FlattenedGeneratedMessageV3.Builder builder) { + final List newList = new ArrayList<>(); + final int size = getRepeatedCount(builder); + for (int i = 0; i < size; i++) { + newList.add(getRepeated(builder, i)); + } + return Collections.unmodifiableList(newList); + } + + @Override + public Object getRepeated(final FlattenedGeneratedMessageV3 message, final int index) { + if (supportUnknownEnumValue) { + int value = (Integer) invokeOrDie(getRepeatedValueMethod, message, index); + return enumDescriptor.findValueByNumberCreatingIfUnknown(value); + } + return invokeOrDie(getValueDescriptorMethod, super.getRepeated(message, index)); + } + + @Override + public Object getRepeated(final FlattenedGeneratedMessageV3.Builder builder, final int index) { + if (supportUnknownEnumValue) { + int value = (Integer) invokeOrDie(getRepeatedValueMethodBuilder, builder, index); + return enumDescriptor.findValueByNumberCreatingIfUnknown(value); + } + return invokeOrDie(getValueDescriptorMethod, super.getRepeated(builder, index)); + } + + @Override + public void setRepeated(final Builder builder, final int index, final Object value) { + if (supportUnknownEnumValue) { + // TODO: remove the unused variable + Object unused = + invokeOrDie( + setRepeatedValueMethod, + builder, + index, + ((EnumValueDescriptor) value).getNumber()); + return; + } + super.setRepeated(builder, index, invokeOrDie(valueOfMethod, null, value)); + } + + @Override + public void addRepeated(final Builder builder, final Object value) { + if (supportUnknownEnumValue) { + // TODO: remove the unused variable + Object unused = + invokeOrDie( + addRepeatedValueMethod, builder, ((EnumValueDescriptor) value).getNumber()); + return; + } + super.addRepeated(builder, invokeOrDie(valueOfMethod, null, value)); + } + } + + // --------------------------------------------------------------- + + /** + * Field accessor for string fields. + * + *

This class makes getFooBytes() and setFooBytes() available for reflection API so that + * reflection based serialize/parse functions can access the raw bytes of the field to preserve + * non-UTF8 bytes in the string. + * + *

This ensures the serialize/parse round-trip safety, which is important for servers which + * forward messages. + */ + private static final class SingularStringFieldAccessor extends SingularFieldAccessor { + SingularStringFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass, + final String containingOneofCamelCaseName) { + super(descriptor, camelCaseName, messageClass, builderClass, containingOneofCamelCaseName); + getBytesMethod = getMethodOrDie(messageClass, "get" + camelCaseName + "Bytes"); + setBytesMethodBuilder = + getMethodOrDie(builderClass, "set" + camelCaseName + "Bytes", ByteString.class); + } + + private final Method getBytesMethod; + private final Method setBytesMethodBuilder; + + @Override + public Object getRaw(final FlattenedGeneratedMessageV3 message) { + return invokeOrDie(getBytesMethod, message); + } + + @Override + public void set(FlattenedGeneratedMessageV3.Builder builder, Object value) { + if (value instanceof ByteString) { + // TODO: remove the unused variable + Object unused = invokeOrDie(setBytesMethodBuilder, builder, value); + } else { + super.set(builder, value); + } + } + } + + // --------------------------------------------------------------- + + private static final class SingularMessageFieldAccessor extends SingularFieldAccessor { + SingularMessageFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass, + final String containingOneofCamelCaseName) { + super(descriptor, camelCaseName, messageClass, builderClass, containingOneofCamelCaseName); + + newBuilderMethod = getMethodOrDie(type, "newBuilder"); + getBuilderMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName + "Builder"); + } + + private final Method newBuilderMethod; + private final Method getBuilderMethodBuilder; + + private Object coerceType(final Object value) { + if (type.isInstance(value)) { + return value; + } else { + // The value is not the exact right message type. However, if it + // is an alternative implementation of the same type -- e.g. a + // DynamicMessage -- we should accept it. In this case we can make + // a copy of the message. + return ((Message.Builder) invokeOrDie(newBuilderMethod, null)) + .mergeFrom((Message) value) + .buildPartial(); + } + } + + @Override + public void set(final Builder builder, final Object value) { + super.set(builder, coerceType(value)); + } + + @Override + public Message.Builder newBuilder() { + return (Message.Builder) invokeOrDie(newBuilderMethod, null); + } + + @Override + public Message.Builder getBuilder(FlattenedGeneratedMessageV3.Builder builder) { + return (Message.Builder) invokeOrDie(getBuilderMethodBuilder, builder); + } + } + + private static final class RepeatedMessageFieldAccessor extends RepeatedFieldAccessor { + RepeatedMessageFieldAccessor( + final FieldDescriptor descriptor, + final String camelCaseName, + final Class messageClass, + final Class> builderClass) { + super(descriptor, camelCaseName, messageClass, builderClass); + + newBuilderMethod = getMethodOrDie(type, "newBuilder"); + getBuilderMethodBuilder = + getMethodOrDie(builderClass, "get" + camelCaseName + "Builder", Integer.TYPE); + } + + private final Method newBuilderMethod; + private final Method getBuilderMethodBuilder; + + private Object coerceType(final Object value) { + if (type.isInstance(value)) { + return value; + } else { + // The value is not the exact right message type. However, if it + // is an alternative implementation of the same type -- e.g. a + // DynamicMessage -- we should accept it. In this case we can make + // a copy of the message. + return ((Message.Builder) invokeOrDie(newBuilderMethod, null)) + .mergeFrom((Message) value) + .build(); + } + } + + @Override + public void setRepeated(final Builder builder, final int index, final Object value) { + super.setRepeated(builder, index, coerceType(value)); + } + + @Override + public void addRepeated(final Builder builder, final Object value) { + super.addRepeated(builder, coerceType(value)); + } + + @Override + public Message.Builder newBuilder() { + return (Message.Builder) invokeOrDie(newBuilderMethod, null); + } + + @Override + public Message.Builder getRepeatedBuilder( + final FlattenedGeneratedMessageV3.Builder builder, final int index) { + return (Message.Builder) invokeOrDie(getBuilderMethodBuilder, builder, index); + } + } + } + + /** + * Replaces this object in the output stream with a serialized form. Part of Java's serialization + * magic. Generated sub-classes must override this method by calling {@code return + * super.writeReplace();} + * + * @return a SerializedForm of this message + */ + protected Object writeReplace() throws ObjectStreamException { + return new GeneratedMessageLite.SerializedForm(this); + } + + /** + * Checks that the {@link Extension} is non-Lite and returns it as a {@link GeneratedExtension}. + */ + private static , T> + Extension checkNotLite(ExtensionLite extension) { + if (extension.isLite()) { + throw new IllegalArgumentException("Expected non-lite extension."); + } + + return (Extension) extension; + } + + protected static boolean isStringEmpty(final Object value) { + if (value instanceof String) { + return ((String) value).isEmpty(); + } else { + return ((ByteString) value).isEmpty(); + } + } + + protected static int computeStringSize(final int fieldNumber, final Object value) { + if (value instanceof String) { + return CodedOutputStream.computeStringSize(fieldNumber, (String) value); + } else { + return CodedOutputStream.computeBytesSize(fieldNumber, (ByteString) value); + } + } + + protected static int computeStringSizeNoTag(final Object value) { + if (value instanceof String) { + return CodedOutputStream.computeStringSizeNoTag((String) value); + } else { + return CodedOutputStream.computeBytesSizeNoTag((ByteString) value); + } + } + + protected static void writeString( + CodedOutputStream output, final int fieldNumber, final Object value) throws IOException { + if (value instanceof String) { + output.writeString(fieldNumber, (String) value); + } else { + output.writeBytes(fieldNumber, (ByteString) value); + } + } + + protected static void writeStringNoTag(CodedOutputStream output, final Object value) + throws IOException { + if (value instanceof String) { + output.writeStringNoTag((String) value); + } else { + output.writeBytesNoTag((ByteString) value); + } + } + + protected static void serializeIntegerMapTo( + CodedOutputStream out, + MapField field, + MapEntry defaultEntry, + int fieldNumber) + throws IOException { + Map m = field.getMap(); + if (!out.isSerializationDeterministic()) { + serializeMapTo(out, m, defaultEntry, fieldNumber); + return; + } + // Sorting the unboxed keys and then look up the values during serialization is 2x faster + // than sorting map entries with a custom comparator directly. + int[] keys = new int[m.size()]; + int index = 0; + for (int k : m.keySet()) { + keys[index++] = k; + } + Arrays.sort(keys); + for (int key : keys) { + out.writeMessage( + fieldNumber, defaultEntry.newBuilderForType().setKey(key).setValue(m.get(key)).build()); + } + } + + protected static void serializeLongMapTo( + CodedOutputStream out, + MapField field, + MapEntry defaultEntry, + int fieldNumber) + throws IOException { + Map m = field.getMap(); + if (!out.isSerializationDeterministic()) { + serializeMapTo(out, m, defaultEntry, fieldNumber); + return; + } + + long[] keys = new long[m.size()]; + int index = 0; + for (long k : m.keySet()) { + keys[index++] = k; + } + Arrays.sort(keys); + for (long key : keys) { + out.writeMessage( + fieldNumber, defaultEntry.newBuilderForType().setKey(key).setValue(m.get(key)).build()); + } + } + + protected static void serializeStringMapTo( + CodedOutputStream out, + MapField field, + MapEntry defaultEntry, + int fieldNumber) + throws IOException { + Map m = field.getMap(); + if (!out.isSerializationDeterministic()) { + serializeMapTo(out, m, defaultEntry, fieldNumber); + return; + } + + // Sorting the String keys and then look up the values during serialization is 25% faster than + // sorting map entries with a custom comparator directly. + String[] keys = new String[m.size()]; + keys = m.keySet().toArray(keys); + Arrays.sort(keys); + for (String key : keys) { + out.writeMessage( + fieldNumber, defaultEntry.newBuilderForType().setKey(key).setValue(m.get(key)).build()); + } + } + + protected static void serializeBooleanMapTo( + CodedOutputStream out, + MapField field, + MapEntry defaultEntry, + int fieldNumber) + throws IOException { + Map m = field.getMap(); + if (!out.isSerializationDeterministic()) { + serializeMapTo(out, m, defaultEntry, fieldNumber); + return; + } + maybeSerializeBooleanEntryTo(out, m, defaultEntry, fieldNumber, false); + maybeSerializeBooleanEntryTo(out, m, defaultEntry, fieldNumber, true); + } + + private static void maybeSerializeBooleanEntryTo( + CodedOutputStream out, + Map m, + MapEntry defaultEntry, + int fieldNumber, + boolean key) + throws IOException { + if (m.containsKey(key)) { + out.writeMessage( + fieldNumber, defaultEntry.newBuilderForType().setKey(key).setValue(m.get(key)).build()); + } + } + + /** Serialize the map using the iteration order. */ + private static void serializeMapTo( + CodedOutputStream out, Map m, MapEntry defaultEntry, int fieldNumber) + throws IOException { + for (Map.Entry entry : m.entrySet()) { + out.writeMessage( + fieldNumber, + defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build()); + } + } +} diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FloatValue.java b/protobuf-api/src/main/java/com/google/protobuf/FloatValue.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/FloatValue.java rename to protobuf-api/src/main/java/com/google/protobuf/FloatValue.java index 4b4a8d4..07dc2da 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/FloatValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/FloatValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.FloatValue} */ public final class FloatValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.FloatValue) FloatValueOrBuilder { private static final long serialVersionUID = 0L; // Use FloatValue.newBuilder() to construct. - private FloatValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FloatValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private FloatValue() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -161,20 +161,20 @@ public static com.google.protobuf.FloatValue parseFrom( } public static com.google.protobuf.FloatValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.FloatValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.FloatValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -182,20 +182,20 @@ public static com.google.protobuf.FloatValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.FloatValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.FloatValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -215,7 +215,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -229,7 +229,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.FloatValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.FloatValue) com.google.protobuf.FloatValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -238,7 +238,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_FloatValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -251,7 +251,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/FloatValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/FloatValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/FloatValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/FloatValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Int32Value.java b/protobuf-api/src/main/java/com/google/protobuf/Int32Value.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/Int32Value.java rename to protobuf-api/src/main/java/com/google/protobuf/Int32Value.java index e14fc28..b6ca2bb 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Int32Value.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Int32Value.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.Int32Value} */ public final class Int32Value extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Int32Value) Int32ValueOrBuilder { private static final long serialVersionUID = 0L; // Use Int32Value.newBuilder() to construct. - private Int32Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int32Value(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Int32Value() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -159,20 +159,20 @@ public static com.google.protobuf.Int32Value parseFrom( } public static com.google.protobuf.Int32Value parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Int32Value parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Int32Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -180,20 +180,20 @@ public static com.google.protobuf.Int32Value parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Int32Value parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Int32Value parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -213,7 +213,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -227,7 +227,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Int32Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Int32Value) com.google.protobuf.Int32ValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -236,7 +236,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int32Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -249,7 +249,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/Int32ValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Int64Value.java b/protobuf-api/src/main/java/com/google/protobuf/Int64Value.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/Int64Value.java rename to protobuf-api/src/main/java/com/google/protobuf/Int64Value.java index 0d7c811..250d70d 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Int64Value.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Int64Value.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.Int64Value} */ public final class Int64Value extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Int64Value) Int64ValueOrBuilder { private static final long serialVersionUID = 0L; // Use Int64Value.newBuilder() to construct. - private Int64Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int64Value(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Int64Value() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -160,20 +160,20 @@ public static com.google.protobuf.Int64Value parseFrom( } public static com.google.protobuf.Int64Value parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Int64Value parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Int64Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -181,20 +181,20 @@ public static com.google.protobuf.Int64Value parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Int64Value parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Int64Value parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -214,7 +214,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -228,7 +228,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Int64Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Int64Value) com.google.protobuf.Int64ValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -237,7 +237,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -250,7 +250,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/Int64ValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/ListValue.java b/protobuf-api/src/main/java/com/google/protobuf/ListValue.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/ListValue.java rename to protobuf-api/src/main/java/com/google/protobuf/ListValue.java index 8a2d1d8..e73789f 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/ListValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/ListValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.ListValue} */ public final class ListValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.ListValue) ListValueOrBuilder { private static final long serialVersionUID = 0L; // Use ListValue.newBuilder() to construct. - private ListValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private ListValue() { @@ -39,7 +39,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -208,20 +208,20 @@ public static com.google.protobuf.ListValue parseFrom( } public static com.google.protobuf.ListValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.ListValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.ListValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -229,20 +229,20 @@ public static com.google.protobuf.ListValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.ListValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.ListValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -262,7 +262,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -276,7 +276,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.ListValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.ListValue) com.google.protobuf.ListValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -285,7 +285,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_ListValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -298,7 +298,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -424,7 +424,7 @@ public Builder mergeFrom(com.google.protobuf.ListValue other) { values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000001); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/ListValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/ListValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/ListValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/ListValueOrBuilder.java diff --git a/protobuf-api/src/main/java/com/google/protobuf/MapEntry.java b/protobuf-api/src/main/java/com/google/protobuf/MapEntry.java index c065bee..8cd34ee 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/MapEntry.java +++ b/protobuf-api/src/main/java/com/google/protobuf/MapEntry.java @@ -10,11 +10,23 @@ import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Descriptors.EnumValueDescriptor; import com.google.protobuf.Descriptors.FieldDescriptor; + +import java.io.FilterInputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.TreeMap; +import static com.google.protobuf.Internal.checkNotNull; + /** * Implements MapEntry messages. * @@ -24,7 +36,7 @@ * *

Protobuf internal. Users shouldn't use this class. */ -public final class MapEntry extends AbstractMessage { +public final class MapEntry implements Message { private static final class Metadata extends MapEntryLite.Metadata { @@ -216,8 +228,319 @@ public UnknownFieldSet getUnknownFields() { return UnknownFieldSet.getDefaultInstance(); } + protected int memoizedHashCode = 0; + + @Override + public ByteString toByteString() { + try { + final ByteString.CodedBuilder out = ByteString.newCodedBuilder(getSerializedSize()); + writeTo(out.getCodedOutput()); + return out.build(); + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("ByteString"), e); + } + } + + @Override + public byte[] toByteArray() { + try { + final byte[] result = new byte[getSerializedSize()]; + final CodedOutputStream output = CodedOutputStream.newInstance(result); + writeTo(output); + output.checkNoSpaceLeft(); + return result; + } catch (IOException e) { + throw new RuntimeException(getSerializingExceptionMessage("byte array"), e); + } + } + + @Override + public void writeTo(final OutputStream output) throws IOException { + final int bufferSize = CodedOutputStream.computePreferredBufferSize(getSerializedSize()); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + writeTo(codedOutput); + codedOutput.flush(); + } + + @Override + public void writeDelimitedTo(final OutputStream output) throws IOException { + final int serialized = getSerializedSize(); + final int bufferSize = + CodedOutputStream.computePreferredBufferSize( + CodedOutputStream.computeUInt32SizeNoTag(serialized) + serialized); + final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, bufferSize); + codedOutput.writeUInt32NoTag(serialized); + writeTo(codedOutput); + codedOutput.flush(); + } + + int getSerializedSize( + Schema schema) { + int memoizedSerializedSize = getMemoizedSerializedSize(); + if (memoizedSerializedSize == -1) { + memoizedSerializedSize = schema.getSerializedSize(this); + setMemoizedSerializedSize(memoizedSerializedSize); + } + return memoizedSerializedSize; + } + + private String getSerializingExceptionMessage(String target) { + return "Serializing " + + getClass().getName() + + " to a " + + target + + " threw an IOException (should never happen)."; + } + + protected static void checkByteStringIsUtf8(ByteString byteString) + throws IllegalArgumentException { + if (!byteString.isValidUtf8()) { + throw new IllegalArgumentException("Byte string is not UTF-8."); + } + } + + /** Interface for an enum which signifies which field in a {@code oneof} was specified. */ + protected interface InternalOneOfEnum { + /** + * Retrieves the field number of the field which was set in this {@code oneof}, or {@code 0} if + * none were. + */ + int getNumber(); + } + + /** + * Interface for the parent of a Builder that allows the builder to communicate invalidations back + * to the parent for use when using nested builders. + */ + protected interface BuilderParent { + + /** + * A builder becomes dirty whenever a field is modified -- including fields in nested builders + * -- and becomes clean when build() is called. Thus, when a builder becomes dirty, all its + * parents become dirty as well, and when it becomes clean, all its children become clean. The + * dirtiness state is used to invalidate certain cached values. + * + *

To this end, a builder calls markDirty() on its parent whenever it transitions from clean + * to dirty. The parent must propagate this call to its own parent, unless it was already dirty, + * in which case the grandparent must necessarily already be dirty as well. The parent can only + * transition back to "clean" after calling build() on all children. + */ + void markDirty(); + } + + /** Create a nested builder. */ + protected Message.Builder newBuilderForType(Message.BuilderParent parent) { + throw new UnsupportedOperationException("Nested builder is not supported for this type."); + } + + @Override + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + @Override + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + // TODO: Clear it when all subclasses have implemented this method. + @Override + public boolean hasOneof(Descriptors.OneofDescriptor oneof) { + throw new UnsupportedOperationException("hasOneof() is not implemented."); + } + + // TODO: Clear it when all subclasses have implemented this method. + @Override + public FieldDescriptor getOneofFieldDescriptor(Descriptors.OneofDescriptor oneof) { + throw new UnsupportedOperationException("getOneofFieldDescriptor() is not implemented."); + } + + @Override + public final String toString() { + return TextFormat.printer().printToString(this); + } + + protected int memoizedSize = -1; + + int getMemoizedSerializedSize() { + return memoizedSize; + } + + void setMemoizedSerializedSize(int size) { + memoizedSize = size; + } + + @Override + public boolean equals(final Object other) { + if (other == this) { + return true; + } + if (!(other instanceof Message)) { + return false; + } + final Message otherMessage = (Message) other; + if (getDescriptorForType() != otherMessage.getDescriptorForType()) { + return false; + } + return compareFields(getAllFields(), otherMessage.getAllFields()) + && getUnknownFields().equals(otherMessage.getUnknownFields()); + } + + @Override + public int hashCode() { + int hash = memoizedHashCode; + if (hash == 0) { + hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = hashFields(hash, getAllFields()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + } + return hash; + } + + private static ByteString toByteString(Object value) { + if (value instanceof byte[]) { + return ByteString.copyFrom((byte[]) value); + } else { + return (ByteString) value; + } + } + + /** + * Compares two bytes fields. The parameters must be either a byte array or a ByteString object. + * They can be of different type though. + */ + private static boolean compareBytes(Object a, Object b) { + if (a instanceof byte[] && b instanceof byte[]) { + return Arrays.equals((byte[]) a, (byte[]) b); + } + return toByteString(a).equals(toByteString(b)); + } + + /** Converts a list of MapEntry messages into a Map used for equals() and hashCode(). */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Map convertMapEntryListToMap(List list) { + if (list.isEmpty()) { + return Collections.emptyMap(); + } + Map result = new HashMap<>(); + Iterator iterator = list.iterator(); + Message entry = (Message) iterator.next(); + Descriptors.Descriptor descriptor = entry.getDescriptorForType(); + FieldDescriptor key = descriptor.findFieldByName("key"); + FieldDescriptor value = descriptor.findFieldByName("value"); + Object fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + while (iterator.hasNext()) { + entry = (Message) iterator.next(); + fieldValue = entry.getField(value); + if (fieldValue instanceof EnumValueDescriptor) { + fieldValue = ((EnumValueDescriptor) fieldValue).getNumber(); + } + result.put(entry.getField(key), fieldValue); + } + return result; + } + + /** Compares two map fields. The parameters must be a list of MapEntry messages. */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static boolean compareMapField(Object a, Object b) { + Map ma = convertMapEntryListToMap((List) a); + Map mb = convertMapEntryListToMap((List) b); + return MapFieldLite.equals(ma, mb); + } + + /** + * Compares two sets of fields. This method is used to implement {@link + * Message#equals(Object)} and {@link AbstractMutableMessage#equals(Object)}. It takes + * special care of bytes fields because immutable messages and mutable messages use different Java + * type to represent a bytes field and this method should be able to compare immutable messages, + * mutable messages and also an immutable message to a mutable message. + */ + static boolean compareFields(Map a, Map b) { + if (a.size() != b.size()) { + return false; + } + for (FieldDescriptor descriptor : a.keySet()) { + if (!b.containsKey(descriptor)) { + return false; + } + Object value1 = a.get(descriptor); + Object value2 = b.get(descriptor); + if (descriptor.getType() == FieldDescriptor.Type.BYTES) { + if (descriptor.isRepeated()) { + List list1 = (List) value1; + List list2 = (List) value2; + if (list1.size() != list2.size()) { + return false; + } + for (int i = 0; i < list1.size(); i++) { + if (!compareBytes(list1.get(i), list2.get(i))) { + return false; + } + } + } else { + // Compares a singular bytes field. + if (!compareBytes(value1, value2)) { + return false; + } + } + } else if (descriptor.isMapField()) { + if (!compareMapField(value1, value2)) { + return false; + } + } else { + // Compare non-bytes fields. + if (!value1.equals(value2)) { + return false; + } + } + } + return true; + } + + /** Calculates the hash code of a map field. {@code value} must be a list of MapEntry messages. */ + @SuppressWarnings("unchecked") + private static int hashMapField(Object value) { + return MapFieldLite.calculateHashCodeForMap(convertMapEntryListToMap((List) value)); + } + + /** Get a hash code for given fields and values, using the given seed. */ + @SuppressWarnings("unchecked") + protected static int hashFields(int hash, Map map) { + for (Map.Entry entry : map.entrySet()) { + FieldDescriptor field = entry.getKey(); + Object value = entry.getValue(); + hash = (37 * hash) + field.getNumber(); + if (field.isMapField()) { + hash = (53 * hash) + hashMapField(value); + } else if (field.getType() != FieldDescriptor.Type.ENUM) { + hash = (53 * hash) + value.hashCode(); + } else if (field.isRepeated()) { + List list = (List) value; + hash = (53 * hash) + Internal.hashEnumList(list); + } else { + hash = (53 * hash) + Internal.hashEnum((Internal.EnumLite) value); + } + } + return hash; + } + + /** + * Package private helper method for AbstractParser to create UninitializedMessageException with + * missing field information. + */ + UninitializedMessageException newUninitializedMessageException() { + return Builder.newUninitializedMessageException(this); + } + + /** Builder to create {@link MapEntry} messages. */ - public static class Builder extends AbstractMessage.Builder> { + public static class Builder implements Message.Builder { private final Metadata metadata; private K key; private V value; @@ -417,10 +740,466 @@ public UnknownFieldSet getUnknownFields() { return UnknownFieldSet.getDefaultInstance(); } - @Override public Builder clone() { return new Builder<>(metadata, key, value, hasKey, hasValue); } + + /** + * An InputStream implementations which reads from some other InputStream but is limited to a + * particular number of bytes. Used by mergeDelimitedFrom(). This is intentionally + * package-private so that UnknownFieldSet can share it. + */ + static final class LimitedInputStream extends FilterInputStream { + private int limit; + + LimitedInputStream(InputStream in, int limit) { + super(in); + this.limit = limit; + } + + @Override + public int available() throws IOException { + return Math.min(super.available(), limit); + } + + @Override + public int read() throws IOException { + if (limit <= 0) { + return -1; + } + final int result = super.read(); + if (result >= 0) { + --limit; + } + return result; + } + + @Override + public int read(final byte[] b, final int off, int len) throws IOException { + if (limit <= 0) { + return -1; + } + len = Math.min(len, limit); + final int result = super.read(b, off, len); + if (result >= 0) { + limit -= result; + } + return result; + } + + @Override + public long skip(final long n) throws IOException { + // because we take the minimum of an int and a long, result is guaranteed to be + // less than or equal to Integer.MAX_INT so this cast is safe + int result = (int) super.skip(Math.min(n, limit)); + if (result >= 0) { + // if the superclass adheres to the contract for skip, this condition is always true + limit -= result; + } + return result; + } + } + + @Override + public boolean mergeDelimitedFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final int firstByte = input.read(); + if (firstByte == -1) { + return false; + } + final int size = CodedInputStream.readRawVarint32(firstByte, input); + final InputStream limitedInput = new AbstractMessageLite.Builder.LimitedInputStream(input, size); + mergeFrom(limitedInput, extensionRegistry); + return true; + } + + @Override + public boolean mergeDelimitedFrom(final InputStream input) throws IOException { + return mergeDelimitedFrom(input, ExtensionRegistryLite.getEmptyRegistry()); + } + + @Override + @SuppressWarnings("unchecked") // isInstance takes care of this + public MapEntry.Builder mergeFrom(final MessageLite other) { + if (!getDefaultInstanceForType().getClass().isInstance(other)) { + throw new IllegalArgumentException( + "mergeFrom(MessageLite) can only merge messages of the same type."); + } + + return internalMergeFrom(other); + } + + private String getReadingExceptionMessage(String target) { + return "Reading " + + getClass().getName() + + " from a " + + target + + " threw an IOException (should never happen)."; + } + + // We check nulls as we iterate to avoid iterating over values twice. + private static void addAllCheckingNulls(Iterable values, List list) { + if (list instanceof ArrayList && values instanceof Collection) { + ((ArrayList) list).ensureCapacity(list.size() + ((Collection) values).size()); + } + int begin = list.size(); + for (T value : values) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (list.size() - begin) + " is null."; + for (int i = list.size() - 1; i >= begin; i--) { + list.remove(i); + } + throw new NullPointerException(message); + } + list.add(value); + } + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + MessageLite message) { + return new UninitializedMessageException(message); + } + + // For binary compatibility. + @Deprecated + protected static void addAll(final Iterable values, final Collection list) { + addAll(values, (List) list); + } + + /** + * Adds the {@code values} to the {@code list}. This is a helper method used by generated code. + * Users should ignore it. + * + * @throws NullPointerException if {@code values} or any of the elements of {@code values} is + * null. + */ + protected static void addAll(final Iterable values, final List list) { + checkNotNull(values); + if (values instanceof LazyStringList) { + // For StringOrByteStringLists, check the underlying elements to avoid + // forcing conversions of ByteStrings to Strings. + // TODO: Could we just prohibit nulls in all protobuf lists and get rid of this? Is + // if even possible to hit this condition as all protobuf methods check for null first, + // right? + List lazyValues = ((LazyStringList) values).getUnderlyingElements(); + LazyStringList lazyList = (LazyStringList) list; + int begin = list.size(); + for (Object value : lazyValues) { + if (value == null) { + // encountered a null value so we must undo our modifications prior to throwing + String message = "Element at index " + (lazyList.size() - begin) + " is null."; + for (int i = lazyList.size() - 1; i >= begin; i--) { + lazyList.remove(i); + } + throw new NullPointerException(message); + } + if (value instanceof ByteString) { + lazyList.add((ByteString) value); + } else { + lazyList.add((String) value); + } + } + } else { + if (values instanceof PrimitiveNonBoxingCollection) { + list.addAll((Collection) values); + } else { + addAllCheckingNulls(values, list); + } + } + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public boolean hasOneof(Descriptors.OneofDescriptor oneof) { + throw new UnsupportedOperationException("hasOneof() is not implemented."); + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public FieldDescriptor getOneofFieldDescriptor(Descriptors.OneofDescriptor oneof) { + throw new UnsupportedOperationException("getOneofFieldDescriptor() is not implemented."); + } + + /** TODO: Clear it when all subclasses have implemented this method. */ + @Override + public MapEntry.Builder clearOneof(Descriptors.OneofDescriptor oneof) { + throw new UnsupportedOperationException("clearOneof() is not implemented."); + } + + @Override + public MapEntry.Builder clear() { + for (final Map.Entry entry : getAllFields().entrySet()) { + clearField(entry.getKey()); + } + return (MapEntry.Builder) this; + } + + @Override + public List findInitializationErrors() { + return MessageReflection.findMissingFields(this); + } + + @Override + public String getInitializationErrorString() { + return MessageReflection.delimitWithCommas(findInitializationErrors()); + } + + protected MapEntry.Builder internalMergeFrom(MessageLite other) { + return mergeFrom((Message) other); + } + + @Override + public MapEntry.Builder mergeFrom(final Message other) { + return mergeFrom(other, other.getAllFields()); + } + + MapEntry.Builder mergeFrom(final Message other, Map allFields) { + if (other.getDescriptorForType() != getDescriptorForType()) { + throw new IllegalArgumentException( + "mergeFrom(Message) can only merge messages of the same type."); + } + + // Note: We don't attempt to verify that other's fields have valid + // types. Doing so would be a losing battle. We'd have to verify + // all sub-messages as well, and we'd have to make copies of all of + // them to insure that they don't change after verification (since + // the Message interface itself cannot enforce immutability of + // implementations). + + for (final Map.Entry entry : allFields.entrySet()) { + final FieldDescriptor field = entry.getKey(); + if (field.isRepeated()) { + for (final Object element : (List) entry.getValue()) { + addRepeatedField(field, element); + } + } else if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + final Message existingValue = (Message) getField(field); + if (existingValue == existingValue.getDefaultInstanceForType()) { + setField(field, entry.getValue()); + } else { + setField( + field, + existingValue + .newBuilderForType() + .mergeFrom(existingValue) + .mergeFrom((Message) entry.getValue()) + .build()); + } + } else { + setField(field, entry.getValue()); + } + } + + mergeUnknownFields(other.getUnknownFields()); + + return (MapEntry.Builder) this; + } + + @Override + public MapEntry.Builder mergeFrom(final CodedInputStream input) throws IOException { + return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); + } + + @Override + public MapEntry.Builder mergeFrom( + final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) + throws IOException { + boolean discardUnknown = input.shouldDiscardUnknownFields(); + final UnknownFieldSet.Builder unknownFields = + discardUnknown ? null : getUnknownFieldSetBuilder(); + MessageReflection.mergeMessageFrom(this, unknownFields, input, extensionRegistry); + if (unknownFields != null) { + setUnknownFieldSetBuilder(unknownFields); + } + return (MapEntry.Builder) this; + } + + protected UnknownFieldSet.Builder getUnknownFieldSetBuilder() { + return UnknownFieldSet.newBuilder(getUnknownFields()); + } + + protected void setUnknownFieldSetBuilder(final UnknownFieldSet.Builder builder) { + setUnknownFields(builder.build()); + } + + @Override + public MapEntry.Builder mergeUnknownFields(final UnknownFieldSet unknownFields) { + setUnknownFields( + UnknownFieldSet.newBuilder(getUnknownFields()).mergeFrom(unknownFields).build()); + return (MapEntry.Builder) this; + } + + @Override + public MapEntry.Builder getFieldBuilder(final FieldDescriptor field) { + throw new UnsupportedOperationException( + "getFieldBuilder() called on an unsupported message type."); + } + + @Override + public MapEntry.Builder getRepeatedFieldBuilder(final FieldDescriptor field, int index) { + throw new UnsupportedOperationException( + "getRepeatedFieldBuilder() called on an unsupported message type."); + } + + @Override + public String toString() { + return TextFormat.printer().printToString(this); + } + + /** Construct an UninitializedMessageException reporting missing fields in the given message. */ + protected static UninitializedMessageException newUninitializedMessageException( + Message message) { + return new UninitializedMessageException(MessageReflection.findMissingFields(message)); + } + + /** + * Used to support nested builders and called to mark this builder as clean. Clean builders will + * propagate the {@link FlattenedAbstractMapEntry.BuilderParent#markDirty()} event to their parent builders, while dirty + * builders will not, as their parents should be dirty already. + * + *

NOTE: Implementations that don't support nested builders don't need to override this + * method. + */ + void markClean() { + throw new IllegalStateException("Should be overridden by subclasses."); + } + + /** + * Used to support nested builders and called when this nested builder is no longer used by its + * parent builder and should release the reference to its parent builder. + * + *

NOTE: Implementations that don't support nested builders don't need to override this + * method. + */ + void dispose() { + throw new IllegalStateException("Should be overridden by subclasses."); + } + + public MapEntry.Builder mergeFrom(final ByteString data) throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input); + input.checkLastTagWas(0); + return (MapEntry.Builder) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public MapEntry.Builder mergeFrom( + final ByteString data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = data.newCodedInput(); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (MapEntry.Builder) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("ByteString"), e); + } + } + + public MapEntry.Builder mergeFrom(final byte[] data) throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length); + } + + public MapEntry.Builder mergeFrom(final byte[] data, final int off, final int len) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input); + input.checkLastTagWas(0); + return (MapEntry.Builder) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public MapEntry.Builder mergeFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + return mergeFrom(data, 0, data.length, extensionRegistry); + } + + public MapEntry.Builder mergeFrom( + final byte[] data, + final int off, + final int len, + final ExtensionRegistryLite extensionRegistry) + throws InvalidProtocolBufferException { + try { + final CodedInputStream input = CodedInputStream.newInstance(data, off, len); + mergeFrom(input, extensionRegistry); + input.checkLastTagWas(0); + return (MapEntry.Builder) this; + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException(getReadingExceptionMessage("byte array"), e); + } + } + + public MapEntry.Builder mergeFrom(final InputStream input) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput); + codedInput.checkLastTagWas(0); + return (MapEntry.Builder) this; + } + + public MapEntry.Builder mergeFrom( + final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException { + final CodedInputStream codedInput = CodedInputStream.newInstance(input); + mergeFrom(codedInput, extensionRegistry); + codedInput.checkLastTagWas(0); + return (MapEntry.Builder) this; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashLong(long n) { + return (int) (n ^ (n >>> 32)); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashBoolean(boolean b) { + return b ? 1231 : 1237; + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnum(Internal.EnumLite e) { + return e.getNumber(); + } + + /** + * @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 + * generated code. + */ + @Deprecated + protected static int hashEnumList(List list) { + int hash = 1; + for (Internal.EnumLite e : list) { + hash = 31 * hash + hashEnum(e); + } + return hash; + } } private static boolean isInitialized(Metadata metadata, V value) { diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/MapFieldBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/MapFieldBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/MapFieldBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/MapFieldBuilder.java diff --git a/protobuf-api/src/main/java/com/google/protobuf/Message.java b/protobuf-api/src/main/java/com/google/protobuf/Message.java index 5b02c46..34c765a 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/Message.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Message.java @@ -24,6 +24,26 @@ @CheckReturnValue public interface Message extends MessageLite, MessageOrBuilder { + /** + * Interface for the parent of a Builder that allows the builder to communicate invalidations back + * to the parent for use when using nested builders. + */ + interface BuilderParent { + + /** + * A builder becomes dirty whenever a field is modified -- including fields in nested builders + * -- and becomes clean when build() is called. Thus, when a builder becomes dirty, all its + * parents become dirty as well, and when it becomes clean, all its children become clean. The + * dirtiness state is used to invalidate certain cached values. + * + *

To this end, a builder calls markDirty() on its parent whenever it transitions from clean + * to dirty. The parent must propagate this call to its own parent, unless it was already dirty, + * in which case the grandparent must necessarily already be dirty as well. The parent can only + * transition back to "clean" after calling build() on all children. + */ + void markDirty(); + } + // (From MessageLite, re-declared here only for return type covariance.) @Override Parser getParserForType(); @@ -76,6 +96,7 @@ public interface Message extends MessageLite, MessageOrBuilder { /** Abstract interface implemented by Protocol Message builders. */ interface Builder extends MessageLite.Builder, MessageOrBuilder { + // (From MessageLite.Builder, re-declared here only for return type // covariance.) @Override diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Method.java b/protobuf-api/src/main/java/com/google/protobuf/Method.java similarity index 95% rename from protobuf-sdk/src/main/java/com/google/protobuf/Method.java rename to protobuf-api/src/main/java/com/google/protobuf/Method.java index 541f0f1..9bddbbf 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Method.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Method.java @@ -12,12 +12,12 @@ * Protobuf type {@code google.protobuf.Method} */ public final class Method extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Method) MethodOrBuilder { private static final long serialVersionUID = 0L; // Use Method.newBuilder() to construct. - private Method(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Method(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Method() { @@ -41,7 +41,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -320,17 +320,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestTypeUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestTypeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(requestTypeUrl_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, requestTypeUrl_); } if (requestStreaming_ != false) { output.writeBool(3, requestStreaming_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseTypeUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, responseTypeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(responseTypeUrl_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 4, responseTypeUrl_); } if (responseStreaming_ != false) { output.writeBool(5, responseStreaming_); @@ -350,18 +350,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestTypeUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestTypeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(requestTypeUrl_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, requestTypeUrl_); } if (requestStreaming_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, requestStreaming_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseTypeUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, responseTypeUrl_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(responseTypeUrl_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(4, responseTypeUrl_); } if (responseStreaming_ != false) { size += com.google.protobuf.CodedOutputStream @@ -471,20 +471,20 @@ public static com.google.protobuf.Method parseFrom( } public static com.google.protobuf.Method parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Method parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Method parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -492,20 +492,20 @@ public static com.google.protobuf.Method parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Method parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Method parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -525,7 +525,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -537,7 +537,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Method} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Method) com.google.protobuf.MethodOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -546,7 +546,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Method_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -559,7 +559,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } @@ -730,7 +730,7 @@ public Builder mergeFrom(com.google.protobuf.Method other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000020); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/MethodOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/MethodOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/MethodOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/MethodOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Mixin.java b/protobuf-api/src/main/java/com/google/protobuf/Mixin.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/Mixin.java rename to protobuf-api/src/main/java/com/google/protobuf/Mixin.java index 56f92d0..3731fe4 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Mixin.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Mixin.java @@ -89,12 +89,12 @@ * Protobuf type {@code google.protobuf.Mixin} */ public final class Mixin extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Mixin) MixinOrBuilder { private static final long serialVersionUID = 0L; // Use Mixin.newBuilder() to construct. - private Mixin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Mixin(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Mixin() { @@ -115,7 +115,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -232,11 +232,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(root_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, root_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(root_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 2, root_); } getUnknownFields().writeTo(output); } @@ -247,11 +247,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(root_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, root_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(root_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(2, root_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -326,20 +326,20 @@ public static com.google.protobuf.Mixin parseFrom( } public static com.google.protobuf.Mixin parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Mixin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Mixin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -347,20 +347,20 @@ public static com.google.protobuf.Mixin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Mixin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -380,7 +380,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -469,7 +469,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Mixin} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Mixin) com.google.protobuf.MixinOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -478,7 +478,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.ApiProto.internal_static_google_protobuf_Mixin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -491,7 +491,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/MixinOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/MixinOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/MixinOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/MixinOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/NullValue.java b/protobuf-api/src/main/java/com/google/protobuf/NullValue.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/NullValue.java rename to protobuf-api/src/main/java/com/google/protobuf/NullValue.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Option.java b/protobuf-api/src/main/java/com/google/protobuf/Option.java similarity index 95% rename from protobuf-sdk/src/main/java/com/google/protobuf/Option.java rename to protobuf-api/src/main/java/com/google/protobuf/Option.java index 119fbaf..c4db5d4 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Option.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Option.java @@ -13,12 +13,12 @@ * Protobuf type {@code google.protobuf.Option} */ public final class Option extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Option) OptionOrBuilder { private static final long serialVersionUID = 0L; // Use Option.newBuilder() to construct. - private Option(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Option(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Option() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -160,8 +160,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getValue()); @@ -175,8 +175,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -260,20 +260,20 @@ public static com.google.protobuf.Option parseFrom( } public static com.google.protobuf.Option parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Option parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Option parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -281,20 +281,20 @@ public static com.google.protobuf.Option parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Option parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Option parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -314,7 +314,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -327,7 +327,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Option} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Option) com.google.protobuf.OptionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -336,7 +336,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Option_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -349,12 +349,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getValueFieldBuilder(); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/OptionOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/OptionOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/OptionOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/OptionOrBuilder.java diff --git a/protobuf-api/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java b/protobuf-api/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java index b36794f..f418b3a 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java +++ b/protobuf-api/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java @@ -37,13 +37,13 @@ * @author jonp@google.com (Jon Perlow) */ public class RepeatedFieldBuilderV3< - MType extends AbstractMessage, - BType extends AbstractMessage.Builder, + MType extends Message, + BType extends Message.Builder, IType extends MessageOrBuilder> - implements AbstractMessage.BuilderParent { + implements Message.BuilderParent { // Parent to send changes to. - private AbstractMessage.BuilderParent parent; + private Message.BuilderParent parent; // List of messages. Never null. It may be immutable, in which case // isMessagesListMutable will be false. See note below. @@ -104,7 +104,7 @@ public class RepeatedFieldBuilderV3< public RepeatedFieldBuilderV3( List messages, boolean isMessagesListMutable, - AbstractMessage.BuilderParent parent, + Message.BuilderParent parent, boolean isClean) { this.messages = messages; this.isMessagesListMutable = isMessagesListMutable; @@ -551,8 +551,8 @@ private void incrementModCounts() { * @param the common interface for the message and the builder */ private static class MessageExternalList< - MType extends AbstractMessage, - BType extends AbstractMessage.Builder, + MType extends Message, + BType extends Message.Builder, IType extends MessageOrBuilder> extends AbstractList implements List, RandomAccess { @@ -585,8 +585,8 @@ void incrementModCount() { * @param the common interface for the message and the builder */ private static class BuilderExternalList< - MType extends AbstractMessage, - BType extends AbstractMessage.Builder, + MType extends Message, + BType extends Message.Builder, IType extends MessageOrBuilder> extends AbstractList implements List, RandomAccess { @@ -619,8 +619,8 @@ void incrementModCount() { * @param the common interface for the message and the builder */ private static class MessageOrBuilderExternalList< - MType extends AbstractMessage, - BType extends AbstractMessage.Builder, + MType extends Message, + BType extends Message.Builder, IType extends MessageOrBuilder> extends AbstractList implements List, RandomAccess { diff --git a/protobuf-api/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java b/protobuf-api/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java index 0aff2b8..cad278e 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java +++ b/protobuf-api/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java @@ -30,13 +30,13 @@ * @author jonp@google.com (Jon Perlow) */ public class SingleFieldBuilderV3< - MType extends AbstractMessage, - BType extends AbstractMessage.Builder, + MType extends Message, + BType extends Message.Builder, IType extends MessageOrBuilder> - implements AbstractMessage.BuilderParent { + implements Message.BuilderParent { // Parent to send changes to. - private AbstractMessage.BuilderParent parent; + private Message.BuilderParent parent; // Invariant: one of builder or message fields must be non-null. @@ -53,7 +53,7 @@ public class SingleFieldBuilderV3< // to dispatch dirty invalidations. See AbstractMessage.BuilderListener. private boolean isClean; - public SingleFieldBuilderV3(MType message, AbstractMessage.BuilderParent parent, boolean isClean) { + public SingleFieldBuilderV3(MType message, Message.BuilderParent parent, boolean isClean) { this.message = checkNotNull(message); this.parent = parent; this.isClean = isClean; @@ -105,9 +105,9 @@ public BType getBuilder() { // does not create any sub-objects with independent clean/dirty states, // therefore setting the builder itself to clean without actually calling // build() cannot break any invariants. - builder = (BType) message.newBuilderForType(this); + builder = (BType) message.newBuilderForType(); builder.mergeFrom(message); // no-op if message is the default message - builder.markClean(); +// builder.markClean(); } return builder; } @@ -137,7 +137,7 @@ public IType getMessageOrBuilder() { public SingleFieldBuilderV3 setMessage(MType message) { this.message = checkNotNull(message); if (builder != null) { - builder.dispose(); +// builder.dispose(); builder = null; } onChanged(); @@ -175,7 +175,7 @@ public SingleFieldBuilderV3 clear() { ? message.getDefaultInstanceForType() : builder.getDefaultInstanceForType()); if (builder != null) { - builder.dispose(); +// builder.dispose(); builder = null; } onChanged(); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/SourceContext.java b/protobuf-api/src/main/java/com/google/protobuf/SourceContext.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/SourceContext.java rename to protobuf-api/src/main/java/com/google/protobuf/SourceContext.java index 38c29b8..059b3ec 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/SourceContext.java +++ b/protobuf-api/src/main/java/com/google/protobuf/SourceContext.java @@ -13,12 +13,12 @@ * Protobuf type {@code google.protobuf.SourceContext} */ public final class SourceContext extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.SourceContext) SourceContextOrBuilder { private static final long serialVersionUID = 0L; // Use SourceContext.newBuilder() to construct. - private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SourceContext(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private SourceContext() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.SourceContextProto.internal_static_google_protobuf_SourceContext_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -108,8 +108,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileName_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(fileName_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, fileName_); } getUnknownFields().writeTo(output); } @@ -120,8 +120,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fileName_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(fileName_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, fileName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -192,20 +192,20 @@ public static com.google.protobuf.SourceContext parseFrom( } public static com.google.protobuf.SourceContext parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.SourceContext parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.SourceContext parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -213,20 +213,20 @@ public static com.google.protobuf.SourceContext parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.SourceContext parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.SourceContext parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -246,7 +246,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -259,7 +259,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.SourceContext} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.SourceContext) com.google.protobuf.SourceContextOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -268,7 +268,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.SourceContextProto.internal_static_google_protobuf_SourceContext_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -281,7 +281,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/SourceContextOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/SourceContextOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/SourceContextOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/SourceContextOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/SourceContextProto.java b/protobuf-api/src/main/java/com/google/protobuf/SourceContextProto.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/SourceContextProto.java rename to protobuf-api/src/main/java/com/google/protobuf/SourceContextProto.java index 0fdadc4..e8aa94d 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/SourceContextProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/SourceContextProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_SourceContext_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_SourceContext_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -43,7 +43,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_SourceContext_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_SourceContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_SourceContext_descriptor, new java.lang.String[] { "FileName", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/StringValue.java b/protobuf-api/src/main/java/com/google/protobuf/StringValue.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/StringValue.java rename to protobuf-api/src/main/java/com/google/protobuf/StringValue.java index c5ef53e..7943deb 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/StringValue.java +++ b/protobuf-api/src/main/java/com/google/protobuf/StringValue.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.StringValue} */ public final class StringValue extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.StringValue) StringValueOrBuilder { private static final long serialVersionUID = 0L; // Use StringValue.newBuilder() to construct. - private StringValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StringValue(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private StringValue() { @@ -39,7 +39,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_StringValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -107,8 +107,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, value_); } getUnknownFields().writeTo(output); } @@ -119,8 +119,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -191,20 +191,20 @@ public static com.google.protobuf.StringValue parseFrom( } public static com.google.protobuf.StringValue parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.StringValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.StringValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -212,20 +212,20 @@ public static com.google.protobuf.StringValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.StringValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.StringValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -245,7 +245,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -259,7 +259,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.StringValue} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.StringValue) com.google.protobuf.StringValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -268,7 +268,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_StringValue_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -281,7 +281,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/StringValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/StringValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/StringValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/StringValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Struct.java b/protobuf-api/src/main/java/com/google/protobuf/Struct.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Struct.java rename to protobuf-api/src/main/java/com/google/protobuf/Struct.java index 886142c..9ec8a2a 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Struct.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Struct.java @@ -19,12 +19,12 @@ * Protobuf type {@code google.protobuf.Struct} */ public final class Struct extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Struct) StructOrBuilder { private static final long serialVersionUID = 0L; // Use Struct.newBuilder() to construct. - private Struct(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Struct(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Struct() { @@ -55,7 +55,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_Struct_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -171,7 +171,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.FlattenedGeneratedMessageV3 .serializeStringMapTo( output, internalGetFields(), @@ -267,20 +267,20 @@ public static com.google.protobuf.Struct parseFrom( } public static com.google.protobuf.Struct parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Struct parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Struct parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -288,20 +288,20 @@ public static com.google.protobuf.Struct parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Struct parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Struct parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -321,7 +321,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -340,7 +340,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Struct} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Struct) com.google.protobuf.StructOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -371,7 +371,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_Struct_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -384,7 +384,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/StructOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/StructOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/StructOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/StructOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/StructProto.java b/protobuf-api/src/main/java/com/google/protobuf/StructProto.java similarity index 88% rename from protobuf-sdk/src/main/java/com/google/protobuf/StructProto.java rename to protobuf-api/src/main/java/com/google/protobuf/StructProto.java index 5f0050f..5bf2429 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/StructProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/StructProto.java @@ -18,22 +18,22 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Struct_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Struct_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Struct_FieldsEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Struct_FieldsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Value_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_ListValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_ListValue_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -68,25 +68,25 @@ public static void registerAllExtensions( internal_static_google_protobuf_Struct_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Struct_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Struct_descriptor, new java.lang.String[] { "Fields", }); internal_static_google_protobuf_Struct_FieldsEntry_descriptor = internal_static_google_protobuf_Struct_descriptor.getNestedTypes().get(0); internal_static_google_protobuf_Struct_FieldsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Struct_FieldsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_protobuf_Value_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_protobuf_Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Value_descriptor, new java.lang.String[] { "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue", "Kind", }); internal_static_google_protobuf_ListValue_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_protobuf_ListValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_ListValue_descriptor, new java.lang.String[] { "Values", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Syntax.java b/protobuf-api/src/main/java/com/google/protobuf/Syntax.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/Syntax.java rename to protobuf-api/src/main/java/com/google/protobuf/Syntax.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Timestamp.java b/protobuf-api/src/main/java/com/google/protobuf/Timestamp.java similarity index 96% rename from protobuf-sdk/src/main/java/com/google/protobuf/Timestamp.java rename to protobuf-api/src/main/java/com/google/protobuf/Timestamp.java index a196076..b7eb723 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Timestamp.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Timestamp.java @@ -100,12 +100,12 @@ * Protobuf type {@code google.protobuf.Timestamp} */ public final class Timestamp extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Timestamp) TimestampOrBuilder { private static final long serialVersionUID = 0L; // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Timestamp(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Timestamp() { @@ -124,7 +124,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TimestampProto.internal_static_google_protobuf_Timestamp_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -277,20 +277,20 @@ public static com.google.protobuf.Timestamp parseFrom( } public static com.google.protobuf.Timestamp parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Timestamp parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Timestamp parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -298,20 +298,20 @@ public static com.google.protobuf.Timestamp parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Timestamp parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Timestamp parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -331,7 +331,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -431,7 +431,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Timestamp} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Timestamp) com.google.protobuf.TimestampOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -440,7 +440,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TimestampProto.internal_static_google_protobuf_Timestamp_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -453,7 +453,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/TimestampOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/TimestampOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/TimestampOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/TimestampOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/TimestampProto.java b/protobuf-api/src/main/java/com/google/protobuf/TimestampProto.java similarity index 93% rename from protobuf-sdk/src/main/java/com/google/protobuf/TimestampProto.java rename to protobuf-api/src/main/java/com/google/protobuf/TimestampProto.java index 8cf5af4..9b784c2 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/TimestampProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/TimestampProto.java @@ -18,7 +18,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Timestamp_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Timestamp_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -43,7 +43,7 @@ public static void registerAllExtensions( internal_static_google_protobuf_Timestamp_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Timestamp_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Timestamp_descriptor, new java.lang.String[] { "Seconds", "Nanos", }); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Type.java b/protobuf-api/src/main/java/com/google/protobuf/Type.java similarity index 97% rename from protobuf-sdk/src/main/java/com/google/protobuf/Type.java rename to protobuf-api/src/main/java/com/google/protobuf/Type.java index 88b3492..ebfb94c 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Type.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Type.java @@ -12,12 +12,12 @@ * Protobuf type {@code google.protobuf.Type} */ public final class Type extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Type) TypeOrBuilder { private static final long serialVersionUID = 0L; // Use Type.newBuilder() to construct. - private Type(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Type(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Type() { @@ -43,7 +43,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Type_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -398,14 +398,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < fields_.size(); i++) { output.writeMessage(2, fields_.get(i)); } for (int i = 0; i < oneofs_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, oneofs_.getRaw(i)); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, oneofs_.getRaw(i)); } for (int i = 0; i < options_.size(); i++) { output.writeMessage(4, options_.get(i)); @@ -416,8 +416,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (syntax_ != com.google.protobuf.Syntax.SYNTAX_PROTO2.getNumber()) { output.writeEnum(6, syntax_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, edition_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(edition_)) { + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 7, edition_); } getUnknownFields().writeTo(output); } @@ -428,8 +428,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -455,8 +455,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, syntax_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, edition_); + if (!com.google.protobuf.FlattenedGeneratedMessageV3.isStringEmpty(edition_)) { + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(7, edition_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -561,20 +561,20 @@ public static com.google.protobuf.Type parseFrom( } public static com.google.protobuf.Type parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Type parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Type parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -582,20 +582,20 @@ public static com.google.protobuf.Type parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Type parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Type parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -615,7 +615,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -627,7 +627,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Type} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Type) com.google.protobuf.TypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -636,7 +636,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.TypeProto.internal_static_google_protobuf_Type_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -649,12 +649,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.FlattenedGeneratedMessageV3 .alwaysUseFieldBuilders) { getFieldsFieldBuilder(); getOptionsFieldBuilder(); @@ -835,7 +835,7 @@ public Builder mergeFrom(com.google.protobuf.Type other) { fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000002); fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { fieldsBuilder_.addAllMessages(other.fields_); @@ -871,7 +871,7 @@ public Builder mergeFrom(com.google.protobuf.Type other) { options_ = other.options_; bitField0_ = (bitField0_ & ~0x00000008); optionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.FlattenedGeneratedMessageV3.alwaysUseFieldBuilders ? getOptionsFieldBuilder() : null; } else { optionsBuilder_.addAllMessages(other.options_); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/TypeOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/TypeOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/TypeOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/TypeOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/TypeProto.java b/protobuf-api/src/main/java/com/google/protobuf/TypeProto.java similarity index 90% rename from protobuf-sdk/src/main/java/com/google/protobuf/TypeProto.java rename to protobuf-api/src/main/java/com/google/protobuf/TypeProto.java index 1cc1248..b94a6aa 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/TypeProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/TypeProto.java @@ -18,27 +18,27 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Type_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Type_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Field_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Field_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Enum_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Enum_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_EnumValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_EnumValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Option_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Option_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -101,31 +101,31 @@ public static void registerAllExtensions( internal_static_google_protobuf_Type_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_Type_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Type_descriptor, new java.lang.String[] { "Name", "Fields", "Oneofs", "Options", "SourceContext", "Syntax", "Edition", }); internal_static_google_protobuf_Field_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_protobuf_Field_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Field_descriptor, new java.lang.String[] { "Kind", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options", "JsonName", "DefaultValue", }); internal_static_google_protobuf_Enum_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_protobuf_Enum_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Enum_descriptor, new java.lang.String[] { "Name", "Enumvalue", "Options", "SourceContext", "Syntax", "Edition", }); internal_static_google_protobuf_EnumValue_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_protobuf_EnumValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_EnumValue_descriptor, new java.lang.String[] { "Name", "Number", "Options", }); internal_static_google_protobuf_Option_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_google_protobuf_Option_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Option_descriptor, new java.lang.String[] { "Name", "Value", }); com.google.protobuf.AnyProto.getDescriptor(); diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/UInt32Value.java b/protobuf-api/src/main/java/com/google/protobuf/UInt32Value.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/UInt32Value.java rename to protobuf-api/src/main/java/com/google/protobuf/UInt32Value.java index b8e69f0..885b63d 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/UInt32Value.java +++ b/protobuf-api/src/main/java/com/google/protobuf/UInt32Value.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.UInt32Value} */ public final class UInt32Value extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.UInt32Value) UInt32ValueOrBuilder { private static final long serialVersionUID = 0L; // Use UInt32Value.newBuilder() to construct. - private UInt32Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UInt32Value(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private UInt32Value() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_UInt32Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -159,20 +159,20 @@ public static com.google.protobuf.UInt32Value parseFrom( } public static com.google.protobuf.UInt32Value parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.UInt32Value parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.UInt32Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -180,20 +180,20 @@ public static com.google.protobuf.UInt32Value parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.UInt32Value parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.UInt32Value parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -213,7 +213,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -227,7 +227,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.UInt32Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.UInt32Value) com.google.protobuf.UInt32ValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -236,7 +236,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_UInt32Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -249,7 +249,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/UInt32ValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/UInt32ValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/UInt32ValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/UInt32ValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/UInt64Value.java b/protobuf-api/src/main/java/com/google/protobuf/UInt64Value.java similarity index 94% rename from protobuf-sdk/src/main/java/com/google/protobuf/UInt64Value.java rename to protobuf-api/src/main/java/com/google/protobuf/UInt64Value.java index eabc937..b0db2f5 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/UInt64Value.java +++ b/protobuf-api/src/main/java/com/google/protobuf/UInt64Value.java @@ -14,12 +14,12 @@ * Protobuf type {@code google.protobuf.UInt64Value} */ public final class UInt64Value extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.UInt64Value) UInt64ValueOrBuilder { private static final long serialVersionUID = 0L; // Use UInt64Value.newBuilder() to construct. - private UInt64Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UInt64Value(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private UInt64Value() { @@ -38,7 +38,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_UInt64Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -160,20 +160,20 @@ public static com.google.protobuf.UInt64Value parseFrom( } public static com.google.protobuf.UInt64Value parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.UInt64Value parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.UInt64Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -181,20 +181,20 @@ public static com.google.protobuf.UInt64Value parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.UInt64Value parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.UInt64Value parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -214,7 +214,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -228,7 +228,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.UInt64Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.UInt64Value) com.google.protobuf.UInt64ValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -237,7 +237,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.WrappersProto.internal_static_google_protobuf_UInt64Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -250,7 +250,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/UInt64ValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/UInt64ValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/UInt64ValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/UInt64ValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/Value.java b/protobuf-api/src/main/java/com/google/protobuf/Value.java similarity index 97% rename from protobuf-sdk/src/main/java/com/google/protobuf/Value.java rename to protobuf-api/src/main/java/com/google/protobuf/Value.java index 97dab1a..649a80b 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/Value.java +++ b/protobuf-api/src/main/java/com/google/protobuf/Value.java @@ -17,12 +17,12 @@ * Protobuf type {@code google.protobuf.Value} */ public final class Value extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.FlattenedGeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Value) ValueOrBuilder { private static final long serialVersionUID = 0L; // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Value(com.google.protobuf.FlattenedGeneratedMessageV3.Builder builder) { super(builder); } private Value() { @@ -41,7 +41,7 @@ protected java.lang.Object newInstance( } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -371,7 +371,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) 2, (double)((java.lang.Double) kind_)); } if (kindCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); + com.google.protobuf.FlattenedGeneratedMessageV3.writeString(output, 3, kind_); } if (kindCase_ == 4) { output.writeBool( @@ -402,7 +402,7 @@ public int getSerializedSize() { 2, (double)((java.lang.Double) kind_)); } if (kindCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); + size += com.google.protobuf.FlattenedGeneratedMessageV3.computeStringSize(3, kind_); } if (kindCase_ == 4) { size += com.google.protobuf.CodedOutputStream @@ -542,20 +542,20 @@ public static com.google.protobuf.Value parseFrom( } public static com.google.protobuf.Value parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Value parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } @@ -563,20 +563,20 @@ public static com.google.protobuf.Value parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.Value parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.protobuf.Value parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.FlattenedGeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @@ -596,7 +596,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -613,7 +613,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.protobuf.Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.FlattenedGeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Value) com.google.protobuf.ValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -622,7 +622,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -635,7 +635,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.FlattenedGeneratedMessageV3.BuilderParent parent) { super(parent); } diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/ValueOrBuilder.java b/protobuf-api/src/main/java/com/google/protobuf/ValueOrBuilder.java similarity index 100% rename from protobuf-sdk/src/main/java/com/google/protobuf/ValueOrBuilder.java rename to protobuf-api/src/main/java/com/google/protobuf/ValueOrBuilder.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/WrappersProto.java b/protobuf-api/src/main/java/com/google/protobuf/WrappersProto.java similarity index 82% rename from protobuf-sdk/src/main/java/com/google/protobuf/WrappersProto.java rename to protobuf-api/src/main/java/com/google/protobuf/WrappersProto.java index a83a961..1d2e0cb 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/WrappersProto.java +++ b/protobuf-api/src/main/java/com/google/protobuf/WrappersProto.java @@ -18,47 +18,47 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_DoubleValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_DoubleValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_FloatValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_FloatValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Int64Value_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Int64Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_UInt64Value_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_UInt64Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_Int32Value_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_Int32Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_UInt32Value_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_UInt32Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_BoolValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_BoolValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_StringValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_StringValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_protobuf_BytesValue_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable internal_static_google_protobuf_BytesValue_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -89,55 +89,55 @@ public static void registerAllExtensions( internal_static_google_protobuf_DoubleValue_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_protobuf_DoubleValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_DoubleValue_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_FloatValue_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_protobuf_FloatValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_FloatValue_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_Int64Value_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_protobuf_Int64Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Int64Value_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_UInt64Value_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_protobuf_UInt64Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_UInt64Value_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_Int32Value_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_google_protobuf_Int32Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_Int32Value_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_UInt32Value_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_google_protobuf_UInt32Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_UInt32Value_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_BoolValue_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_google_protobuf_BoolValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_BoolValue_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_StringValue_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_google_protobuf_StringValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_StringValue_descriptor, new java.lang.String[] { "Value", }); internal_static_google_protobuf_BytesValue_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_protobuf_BytesValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.FlattenedGeneratedMessageV3.FieldAccessorTable( internal_static_google_protobuf_BytesValue_descriptor, new java.lang.String[] { "Value", }); } diff --git a/protobuf-api/src/main/java/com/google/protobuf/GeneratedMessageV3.java b/protobuf-sdk/src/main/java/com/google/protobuf/GeneratedMessageV3.java similarity index 100% rename from protobuf-api/src/main/java/com/google/protobuf/GeneratedMessageV3.java rename to protobuf-sdk/src/main/java/com/google/protobuf/GeneratedMessageV3.java diff --git a/protobuf-sdk/src/main/java/com/google/protobuf/JavaFeaturesProto.java b/protobuf-sdk/src/main/java/com/google/protobuf/JavaFeaturesProto.java index 3b79d74..e5b8ac2 100644 --- a/protobuf-sdk/src/main/java/com/google/protobuf/JavaFeaturesProto.java +++ b/protobuf-sdk/src/main/java/com/google/protobuf/JavaFeaturesProto.java @@ -485,42 +485,36 @@ public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseFrom( } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return parseWithIOException(PARSER, input); } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedWithIOException(PARSER, input); } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return parseWithIOException(PARSER, input); } public static com.google.protobuf.JavaFeaturesProto.JavaFeatures parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override