From 06537c5b14e9cbd88004e3a08fc5639f206e7c5f Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 19 Mar 2015 19:03:32 +0300 Subject: [PATCH] Clarify 'class_fq_name` field in jvm_descriptors.proto Regenerate protobuf files with protoc 2.5.0 --- .../kotlin/serialization/DebugProtoBuf.java | 60 +++ .../serialization/js/DebugJsProtoBuf.java | 447 +++++++++--------- .../serialization/jvm/DebugJvmProtoBuf.java | 72 +-- .../kotlin/serialization/js/JsProtoBuf.java | 333 +++++++------ .../src/jvm_descriptors.proto | 5 +- .../kotlin/serialization/jvm/JvmProtoBuf.java | 72 +-- .../kotlin/serialization/ProtoBuf.java | 40 ++ 7 files changed, 565 insertions(+), 464 deletions(-) diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java index 11acd536584..98a121b65a5 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java @@ -6229,14 +6229,26 @@ public final class DebugProtoBuf { // optional .org.jetbrains.kotlin.serialization.Type type = 2; /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ boolean hasType(); /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(); /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder(); } @@ -6476,18 +6488,30 @@ public final class DebugProtoBuf { private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type type_; /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { return type_; } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { return type_; @@ -6800,12 +6824,20 @@ public final class DebugProtoBuf { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> typeBuilder_; /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { if (typeBuilder_ == null) { @@ -6816,6 +6848,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder setType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (typeBuilder_ == null) { @@ -6832,6 +6868,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder setType( org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { @@ -6846,6 +6886,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder mergeType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (typeBuilder_ == null) { @@ -6865,6 +6909,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder clearType() { if (typeBuilder_ == null) { @@ -6878,6 +6926,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000002; @@ -6886,6 +6938,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { if (typeBuilder_ != null) { @@ -6896,6 +6952,10 @@ public final class DebugProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/js/DebugJsProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/js/DebugJsProtoBuf.java index af18b320ff7..82d40a55df7 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/js/DebugJsProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/js/DebugJsProtoBuf.java @@ -3,28 +3,19 @@ package org.jetbrains.kotlin.serialization.js; -import com.google.protobuf.*; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectStreamException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - public final class DebugJsProtoBuf { private DebugJsProtoBuf() {} public static void registerAllExtensions( - ExtensionRegistry registry) { + com.google.protobuf.ExtensionRegistry registry) { } public interface LibraryOrBuilder - extends MessageOrBuilder { + extends com.google.protobuf.MessageOrBuilder { // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - List + java.util.List getEntryList(); /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; @@ -37,7 +28,7 @@ public final class DebugJsProtoBuf { /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - List + java.util.List getEntryOrBuilderList(); /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; @@ -53,14 +44,14 @@ public final class DebugJsProtoBuf { * */ public static final class Library extends - GeneratedMessage + com.google.protobuf.GeneratedMessage implements LibraryOrBuilder { // Use Library.newBuilder() to construct. - private Library(GeneratedMessage.Builder builder) { + private Library(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Library(boolean noInit) { this.unknownFields = UnknownFieldSet.getDefaultInstance(); } + private Library(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Library defaultInstance; public static Library getDefaultInstance() { @@ -71,20 +62,20 @@ public final class DebugJsProtoBuf { return defaultInstance; } - private final UnknownFieldSet unknownFields; - @Override - public final UnknownFieldSet + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Library( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; - UnknownFieldSet.Builder unknownFields = - UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -102,7 +93,7 @@ public final class DebugJsProtoBuf { } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = new ArrayList(); + entry_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } entry_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.PARSER, extensionRegistry)); @@ -110,48 +101,48 @@ public final class DebugJsProtoBuf { } } } - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); - } catch (IOException e) { - throw new InvalidProtocolBufferException( + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = Collections.unmodifiableList(entry_); + entry_ = java.util.Collections.unmodifiableList(entry_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final Descriptors.Descriptor + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor; } - protected GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable .ensureFieldAccessorsInitialized( org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.class, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Builder.class); } - public static Parser PARSER = - new AbstractParser() { + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { public Library parsePartialFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Library(input, extensionRegistry); } }; - @Override - public Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } public interface FileEntryOrBuilder - extends MessageOrBuilder { + extends com.google.protobuf.MessageOrBuilder { // required string path = 1; /** @@ -161,11 +152,11 @@ public final class DebugJsProtoBuf { /** * required string path = 1; */ - String getPath(); + java.lang.String getPath(); /** * required string path = 1; */ - ByteString + com.google.protobuf.ByteString getPathBytes(); // required bytes content = 2; @@ -176,20 +167,20 @@ public final class DebugJsProtoBuf { /** * required bytes content = 2; */ - ByteString getContent(); + com.google.protobuf.ByteString getContent(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library.FileEntry} */ public static final class FileEntry extends - GeneratedMessage + com.google.protobuf.GeneratedMessage implements FileEntryOrBuilder { // Use FileEntry.newBuilder() to construct. - private FileEntry(GeneratedMessage.Builder builder) { + private FileEntry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private FileEntry(boolean noInit) { this.unknownFields = UnknownFieldSet.getDefaultInstance(); } + private FileEntry(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final FileEntry defaultInstance; public static FileEntry getDefaultInstance() { @@ -200,20 +191,20 @@ public final class DebugJsProtoBuf { return defaultInstance; } - private final UnknownFieldSet unknownFields; - @Override - public final UnknownFieldSet + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private FileEntry( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; - UnknownFieldSet.Builder unknownFields = - UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -241,47 +232,47 @@ public final class DebugJsProtoBuf { } } } - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); - } catch (IOException e) { - throw new InvalidProtocolBufferException( + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final Descriptors.Descriptor + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor; } - protected GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.class, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.Builder.class); } - public static Parser PARSER = - new AbstractParser() { + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { public FileEntry parsePartialFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new FileEntry(input, extensionRegistry); } }; - @Override - public Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // required string path = 1; public static final int PATH_FIELD_NUMBER = 1; - private Object path_; + private java.lang.Object path_; /** * required string path = 1; */ @@ -291,14 +282,14 @@ public final class DebugJsProtoBuf { /** * required string path = 1; */ - public String getPath() { - Object ref = path_; - if (ref instanceof String) { - return (String) ref; + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - ByteString bs = - (ByteString) ref; - String s = bs.toStringUtf8(); + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { path_ = s; } @@ -308,23 +299,23 @@ public final class DebugJsProtoBuf { /** * required string path = 1; */ - public ByteString + public com.google.protobuf.ByteString getPathBytes() { - Object ref = path_; - if (ref instanceof String) { - ByteString b = - ByteString.copyFromUtf8( - (String) ref); + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { - return (ByteString) ref; + return (com.google.protobuf.ByteString) ref; } } // required bytes content = 2; public static final int CONTENT_FIELD_NUMBER = 2; - private ByteString content_; + private com.google.protobuf.ByteString content_; /** * required bytes content = 2; */ @@ -334,13 +325,13 @@ public final class DebugJsProtoBuf { /** * required bytes content = 2; */ - public ByteString getContent() { + public com.google.protobuf.ByteString getContent() { return content_; } private void initFields() { path_ = ""; - content_ = ByteString.EMPTY; + content_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -359,8 +350,8 @@ public final class DebugJsProtoBuf { return true; } - public void writeTo(CodedOutputStream output) - throws IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getPathBytes()); @@ -378,11 +369,11 @@ public final class DebugJsProtoBuf { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getPathBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, content_); } size += getUnknownFields().getSerializedSize(); @@ -391,62 +382,62 @@ public final class DebugJsProtoBuf { } private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws ObjectStreamException { + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( - ByteString data) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( - ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom(byte[] data) - throws InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseDelimitedFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseDelimitedFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( - CodedInputStream input) - throws IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parseFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } @@ -457,9 +448,9 @@ public final class DebugJsProtoBuf { } public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -467,14 +458,14 @@ public final class DebugJsProtoBuf { * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library.FileEntry} */ public static final class Builder extends - GeneratedMessage.Builder + com.google.protobuf.GeneratedMessage.Builder implements org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntryOrBuilder { - public static final Descriptors.Descriptor + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor; } - protected GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -487,12 +478,12 @@ public final class DebugJsProtoBuf { } private Builder( - GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { @@ -503,7 +494,7 @@ public final class DebugJsProtoBuf { super.clear(); path_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - content_ = ByteString.EMPTY; + content_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -512,13 +503,13 @@ public final class DebugJsProtoBuf { return create().mergeFrom(buildPartial()); } - public Descriptors.Descriptor + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor; } public org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry getDefaultInstanceForType() { - return getDefaultInstance(); + return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.getDefaultInstance(); } public org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry build() { @@ -546,7 +537,7 @@ public final class DebugJsProtoBuf { return result; } - public Builder mergeFrom(Message other) { + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry) { return mergeFrom((org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry)other); } else { @@ -556,7 +547,7 @@ public final class DebugJsProtoBuf { } public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry other) { - if (other == getDefaultInstance()) return this; + if (other == org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.getDefaultInstance()) return this; if (other.hasPath()) { bitField0_ |= 0x00000001; path_ = other.path_; @@ -582,13 +573,13 @@ public final class DebugJsProtoBuf { } public Builder mergeFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry) e.getUnfinishedMessage(); throw e; } finally { @@ -601,7 +592,7 @@ public final class DebugJsProtoBuf { private int bitField0_; // required string path = 1; - private Object path_ = ""; + private java.lang.Object path_ = ""; /** * required string path = 1; */ @@ -611,38 +602,38 @@ public final class DebugJsProtoBuf { /** * required string path = 1; */ - public String getPath() { - Object ref = path_; - if (!(ref instanceof String)) { - String s = ((ByteString) ref) + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); path_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** * required string path = 1; */ - public ByteString + public com.google.protobuf.ByteString getPathBytes() { - Object ref = path_; + java.lang.Object ref = path_; if (ref instanceof String) { - ByteString b = - ByteString.copyFromUtf8( - (String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { - return (ByteString) ref; + return (com.google.protobuf.ByteString) ref; } } /** * required string path = 1; */ public Builder setPath( - String value) { + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -664,7 +655,7 @@ public final class DebugJsProtoBuf { * required string path = 1; */ public Builder setPathBytes( - ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -675,7 +666,7 @@ public final class DebugJsProtoBuf { } // required bytes content = 2; - private ByteString content_ = ByteString.EMPTY; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes content = 2; */ @@ -685,13 +676,13 @@ public final class DebugJsProtoBuf { /** * required bytes content = 2; */ - public ByteString getContent() { + public com.google.protobuf.ByteString getContent() { return content_; } /** * required bytes content = 2; */ - public Builder setContent(ByteString value) { + public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -723,17 +714,17 @@ public final class DebugJsProtoBuf { // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; public static final int ENTRY_FIELD_NUMBER = 1; - private List entry_; + private java.util.List entry_; /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List getEntryList() { + public java.util.List getEntryList() { return entry_; } /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List + public java.util.List getEntryOrBuilderList() { return entry_; } @@ -758,7 +749,7 @@ public final class DebugJsProtoBuf { } private void initFields() { - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -775,8 +766,8 @@ public final class DebugJsProtoBuf { return true; } - public void writeTo(CodedOutputStream output) - throws IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getSerializedSize(); for (int i = 0; i < entry_.size(); i++) { output.writeMessage(1, entry_.get(i)); @@ -791,7 +782,7 @@ public final class DebugJsProtoBuf { size = 0; for (int i = 0; i < entry_.size(); i++) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, entry_.get(i)); } size += getUnknownFields().getSerializedSize(); @@ -800,62 +791,62 @@ public final class DebugJsProtoBuf { } private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws ObjectStreamException { + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( - ByteString data) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( - ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom(byte[] data) - throws InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseDelimitedFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseDelimitedFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( - CodedInputStream input) - throws IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parseFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } @@ -866,9 +857,9 @@ public final class DebugJsProtoBuf { } public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -880,14 +871,14 @@ public final class DebugJsProtoBuf { * */ public static final class Builder extends - GeneratedMessage.Builder + com.google.protobuf.GeneratedMessage.Builder implements org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.LibraryOrBuilder { - public static final Descriptors.Descriptor + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor; } - protected GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -900,12 +891,12 @@ public final class DebugJsProtoBuf { } private Builder( - GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getEntryFieldBuilder(); } } @@ -916,7 +907,7 @@ public final class DebugJsProtoBuf { public Builder clear() { super.clear(); if (entryBuilder_ == null) { - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { entryBuilder_.clear(); @@ -928,13 +919,13 @@ public final class DebugJsProtoBuf { return create().mergeFrom(buildPartial()); } - public Descriptors.Descriptor + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor; } public org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library getDefaultInstanceForType() { - return getDefaultInstance(); + return org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.getDefaultInstance(); } public org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library build() { @@ -950,7 +941,7 @@ public final class DebugJsProtoBuf { int from_bitField0_ = bitField0_; if (entryBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = Collections.unmodifiableList(entry_); + entry_ = java.util.Collections.unmodifiableList(entry_); bitField0_ = (bitField0_ & ~0x00000001); } result.entry_ = entry_; @@ -961,7 +952,7 @@ public final class DebugJsProtoBuf { return result; } - public Builder mergeFrom(Message other) { + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library) { return mergeFrom((org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library)other); } else { @@ -971,7 +962,7 @@ public final class DebugJsProtoBuf { } public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library other) { - if (other == getDefaultInstance()) return this; + if (other == org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.getDefaultInstance()) return this; if (entryBuilder_ == null) { if (!other.entry_.isEmpty()) { if (entry_.isEmpty()) { @@ -991,7 +982,7 @@ public final class DebugJsProtoBuf { entry_ = other.entry_; bitField0_ = (bitField0_ & ~0x00000001); entryBuilder_ = - GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getEntryFieldBuilder() : null; } else { entryBuilder_.addAllMessages(other.entry_); @@ -1013,13 +1004,13 @@ public final class DebugJsProtoBuf { } public Builder mergeFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library) e.getUnfinishedMessage(); throw e; } finally { @@ -1032,24 +1023,24 @@ public final class DebugJsProtoBuf { private int bitField0_; // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; - private List entry_ = - Collections.emptyList(); + private java.util.List entry_ = + java.util.Collections.emptyList(); private void ensureEntryIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = new ArrayList(entry_); + entry_ = new java.util.ArrayList(entry_); bitField0_ |= 0x00000001; } } - private RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.Builder, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntryOrBuilder> entryBuilder_; /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List getEntryList() { + public java.util.List getEntryList() { if (entryBuilder_ == null) { - return Collections.unmodifiableList(entry_); + return java.util.Collections.unmodifiableList(entry_); } else { return entryBuilder_.getMessageList(); } @@ -1170,10 +1161,10 @@ public final class DebugJsProtoBuf { * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ public Builder addAllEntry( - Iterable values) { + java.lang.Iterable values) { if (entryBuilder_ == null) { ensureEntryIsMutable(); - addAll(values, entry_); + super.addAll(values, entry_); onChanged(); } else { entryBuilder_.addAllMessages(values); @@ -1185,7 +1176,7 @@ public final class DebugJsProtoBuf { */ public Builder clearEntry() { if (entryBuilder_ == null) { - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { @@ -1226,12 +1217,12 @@ public final class DebugJsProtoBuf { /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List + public java.util.List getEntryOrBuilderList() { if (entryBuilder_ != null) { return entryBuilder_.getMessageOrBuilderList(); } else { - return Collections.unmodifiableList(entry_); + return java.util.Collections.unmodifiableList(entry_); } } /** @@ -1252,15 +1243,15 @@ public final class DebugJsProtoBuf { /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List + public java.util.List getEntryBuilderList() { return getEntryFieldBuilder().getBuilderList(); } - private RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.Builder, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntryOrBuilder> getEntryFieldBuilder() { if (entryBuilder_ == null) { - entryBuilder_ = new RepeatedFieldBuilder< + entryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntry.Builder, org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.FileEntryOrBuilder>( entry_, ((bitField0_ & 0x00000001) == 0x00000001), @@ -1282,25 +1273,25 @@ public final class DebugJsProtoBuf { // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.js.Library) } - private static Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor; private static - GeneratedMessage.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable; - private static Descriptors.Descriptor + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor; private static - GeneratedMessage.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable; - public static Descriptors.FileDescriptor + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - String[] descriptorData = { + java.lang.String[] descriptorData = { "\n(core/serialization.js/src/js.debug.pro" + "to\022%org.jetbrains.kotlin.serialization.j" + "s\"~\n\007Library\022G\n\005entry\030\001 \003(\01328.org.jetbra" + @@ -1308,29 +1299,29 @@ public final class DebugJsProtoBuf { "Entry\032*\n\tFileEntry\022\014\n\004path\030\001 \002(\t\022\017\n\007cont" + "ent\030\002 \002(\014B\021B\017DebugJsProtoBuf" }; - Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public ExtensionRegistry assignDescriptors( - Descriptors.FileDescriptor root) { + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable = new - GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor, - new String[] { "Entry", }); + new java.lang.String[] { "Entry", }); internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor = internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor.getNestedTypes().get(0); internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable = new - GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor, - new String[] { "Path", "Content", }); + new java.lang.String[] { "Path", "Content", }); return null; } }; - Descriptors.FileDescriptor + com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, - new Descriptors.FileDescriptor[] { + new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java index 6b54f144ad8..6a9ff04365f 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java @@ -18,28 +18,28 @@ public final class DebugJvmProtoBuf { // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ boolean hasPrimitiveType(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType(); // optional int32 class_fq_name = 2; /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ boolean hasClassFqName(); /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ int getClassFqName(); @@ -55,6 +55,10 @@ public final class DebugJvmProtoBuf { } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} + * + *
+   * Either a primitive type, or a class FQ name should be present
+   * 
*/ public static final class JvmType extends com.google.protobuf.GeneratedMessage @@ -323,20 +327,12 @@ public final class DebugJvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType primitiveType_; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ public boolean hasPrimitiveType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { return primitiveType_; @@ -347,12 +343,20 @@ public final class DebugJvmProtoBuf { private int classFqName_; /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ public boolean hasClassFqName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ public int getClassFqName() { return classFqName_; @@ -501,6 +505,10 @@ public final class DebugJvmProtoBuf { } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} + * + *
+     * Either a primitive type, or a class FQ name should be present
+     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder @@ -639,30 +647,18 @@ public final class DebugJvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType primitiveType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.VOID; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public boolean hasPrimitiveType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { return primitiveType_; } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public Builder setPrimitiveType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType value) { if (value == null) { @@ -675,10 +671,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public Builder clearPrimitiveType() { bitField0_ = (bitField0_ & ~0x00000001); @@ -691,18 +683,30 @@ public final class DebugJvmProtoBuf { private int classFqName_ ; /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public boolean hasClassFqName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public int getClassFqName() { return classFqName_; } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public Builder setClassFqName(int value) { bitField0_ |= 0x00000002; @@ -712,6 +716,10 @@ public final class DebugJvmProtoBuf { } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public Builder clearClassFqName() { bitField0_ = (bitField0_ & ~0x00000002); diff --git a/core/serialization.js/src/org/jetbrains/kotlin/serialization/js/JsProtoBuf.java b/core/serialization.js/src/org/jetbrains/kotlin/serialization/js/JsProtoBuf.java index 8c982affd4f..f51129193a9 100644 --- a/core/serialization.js/src/org/jetbrains/kotlin/serialization/js/JsProtoBuf.java +++ b/core/serialization.js/src/org/jetbrains/kotlin/serialization/js/JsProtoBuf.java @@ -3,28 +3,19 @@ package org.jetbrains.kotlin.serialization.js; -import com.google.protobuf.*; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectStreamException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - public final class JsProtoBuf { private JsProtoBuf() {} public static void registerAllExtensions( - ExtensionRegistryLite registry) { + com.google.protobuf.ExtensionRegistryLite registry) { } public interface LibraryOrBuilder - extends MessageLiteOrBuilder { + extends com.google.protobuf.MessageLiteOrBuilder { // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - List + java.util.List getEntryList(); /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; @@ -43,10 +34,10 @@ public final class JsProtoBuf { * */ public static final class Library extends - GeneratedMessageLite + com.google.protobuf.GeneratedMessageLite implements LibraryOrBuilder { // Use Library.newBuilder() to construct. - private Library(GeneratedMessageLite.Builder builder) { + private Library(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); } @@ -62,9 +53,9 @@ public final class JsProtoBuf { } private Library( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; try { @@ -84,7 +75,7 @@ public final class JsProtoBuf { } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = new ArrayList(); + entry_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } entry_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry.PARSER, extensionRegistry)); @@ -92,35 +83,35 @@ public final class JsProtoBuf { } } } - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); - } catch (IOException e) { - throw new InvalidProtocolBufferException( + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = Collections.unmodifiableList(entry_); + entry_ = java.util.Collections.unmodifiableList(entry_); } makeExtensionsImmutable(); } } - public static Parser PARSER = - new AbstractParser() { + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { public Library parsePartialFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Library(input, extensionRegistry); } }; - @Override - public Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } public interface FileEntryOrBuilder - extends MessageLiteOrBuilder { + extends com.google.protobuf.MessageLiteOrBuilder { // required string path = 1; /** @@ -130,11 +121,11 @@ public final class JsProtoBuf { /** * required string path = 1; */ - String getPath(); + java.lang.String getPath(); /** * required string path = 1; */ - ByteString + com.google.protobuf.ByteString getPathBytes(); // required bytes content = 2; @@ -145,16 +136,16 @@ public final class JsProtoBuf { /** * required bytes content = 2; */ - ByteString getContent(); + com.google.protobuf.ByteString getContent(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library.FileEntry} */ public static final class FileEntry extends - GeneratedMessageLite + com.google.protobuf.GeneratedMessageLite implements FileEntryOrBuilder { // Use FileEntry.newBuilder() to construct. - private FileEntry(GeneratedMessageLite.Builder builder) { + private FileEntry(com.google.protobuf.GeneratedMessageLite.Builder builder) { super(builder); } @@ -170,9 +161,9 @@ public final class JsProtoBuf { } private FileEntry( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; try { @@ -202,34 +193,34 @@ public final class JsProtoBuf { } } } - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); - } catch (IOException e) { - throw new InvalidProtocolBufferException( + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } - public static Parser PARSER = - new AbstractParser() { + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { public FileEntry parsePartialFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new FileEntry(input, extensionRegistry); } }; - @Override - public Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // required string path = 1; public static final int PATH_FIELD_NUMBER = 1; - private Object path_; + private java.lang.Object path_; /** * required string path = 1; */ @@ -239,14 +230,14 @@ public final class JsProtoBuf { /** * required string path = 1; */ - public String getPath() { - Object ref = path_; - if (ref instanceof String) { - return (String) ref; + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - ByteString bs = - (ByteString) ref; - String s = bs.toStringUtf8(); + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { path_ = s; } @@ -256,23 +247,23 @@ public final class JsProtoBuf { /** * required string path = 1; */ - public ByteString + public com.google.protobuf.ByteString getPathBytes() { - Object ref = path_; - if (ref instanceof String) { - ByteString b = - ByteString.copyFromUtf8( - (String) ref); + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { - return (ByteString) ref; + return (com.google.protobuf.ByteString) ref; } } // required bytes content = 2; public static final int CONTENT_FIELD_NUMBER = 2; - private ByteString content_; + private com.google.protobuf.ByteString content_; /** * required bytes content = 2; */ @@ -282,13 +273,13 @@ public final class JsProtoBuf { /** * required bytes content = 2; */ - public ByteString getContent() { + public com.google.protobuf.ByteString getContent() { return content_; } private void initFields() { path_ = ""; - content_ = ByteString.EMPTY; + content_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -307,8 +298,8 @@ public final class JsProtoBuf { return true; } - public void writeTo(CodedOutputStream output) - throws IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getPathBytes()); @@ -325,11 +316,11 @@ public final class JsProtoBuf { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getPathBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, content_); } memoizedSerializedSize = size; @@ -337,62 +328,62 @@ public final class JsProtoBuf { } private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws ObjectStreamException { + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( - ByteString data) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( - ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom(byte[] data) - throws InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseDelimitedFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseDelimitedFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( - CodedInputStream input) - throws IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parseFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } @@ -407,7 +398,7 @@ public final class JsProtoBuf { * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library.FileEntry} */ public static final class Builder extends - GeneratedMessageLite.Builder< + com.google.protobuf.GeneratedMessageLite.Builder< org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry, Builder> implements org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntryOrBuilder { // Construct using org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry.newBuilder() @@ -425,7 +416,7 @@ public final class JsProtoBuf { super.clear(); path_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - content_ = ByteString.EMPTY; + content_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -435,7 +426,7 @@ public final class JsProtoBuf { } public org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry getDefaultInstanceForType() { - return getDefaultInstance(); + return org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry.getDefaultInstance(); } public org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry build() { @@ -463,7 +454,7 @@ public final class JsProtoBuf { } public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry other) { - if (other == getDefaultInstance()) return this; + if (other == org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry.getDefaultInstance()) return this; if (other.hasPath()) { bitField0_ |= 0x00000001; path_ = other.path_; @@ -488,13 +479,13 @@ public final class JsProtoBuf { } public Builder mergeFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.FileEntry) e.getUnfinishedMessage(); throw e; } finally { @@ -507,7 +498,7 @@ public final class JsProtoBuf { private int bitField0_; // required string path = 1; - private Object path_ = ""; + private java.lang.Object path_ = ""; /** * required string path = 1; */ @@ -517,38 +508,38 @@ public final class JsProtoBuf { /** * required string path = 1; */ - public String getPath() { - Object ref = path_; - if (!(ref instanceof String)) { - String s = ((ByteString) ref) + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); path_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** * required string path = 1; */ - public ByteString + public com.google.protobuf.ByteString getPathBytes() { - Object ref = path_; + java.lang.Object ref = path_; if (ref instanceof String) { - ByteString b = - ByteString.copyFromUtf8( - (String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); path_ = b; return b; } else { - return (ByteString) ref; + return (com.google.protobuf.ByteString) ref; } } /** * required string path = 1; */ public Builder setPath( - String value) { + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -570,7 +561,7 @@ public final class JsProtoBuf { * required string path = 1; */ public Builder setPathBytes( - ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -581,7 +572,7 @@ public final class JsProtoBuf { } // required bytes content = 2; - private ByteString content_ = ByteString.EMPTY; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes content = 2; */ @@ -591,13 +582,13 @@ public final class JsProtoBuf { /** * required bytes content = 2; */ - public ByteString getContent() { + public com.google.protobuf.ByteString getContent() { return content_; } /** * required bytes content = 2; */ - public Builder setContent(ByteString value) { + public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -629,17 +620,17 @@ public final class JsProtoBuf { // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; public static final int ENTRY_FIELD_NUMBER = 1; - private List entry_; + private java.util.List entry_; /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List getEntryList() { + public java.util.List getEntryList() { return entry_; } /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List + public java.util.List getEntryOrBuilderList() { return entry_; } @@ -664,7 +655,7 @@ public final class JsProtoBuf { } private void initFields() { - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -681,8 +672,8 @@ public final class JsProtoBuf { return true; } - public void writeTo(CodedOutputStream output) - throws IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getSerializedSize(); for (int i = 0; i < entry_.size(); i++) { output.writeMessage(1, entry_.get(i)); @@ -696,7 +687,7 @@ public final class JsProtoBuf { size = 0; for (int i = 0; i < entry_.size(); i++) { - size += CodedOutputStream + size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, entry_.get(i)); } memoizedSerializedSize = size; @@ -704,62 +695,62 @@ public final class JsProtoBuf { } private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws ObjectStreamException { + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( - ByteString data) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( - ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom(byte[] data) - throws InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseDelimitedFrom(InputStream input) - throws IOException { + public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseDelimitedFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( - CodedInputStream input) - throws IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return PARSER.parseFrom(input); } public static org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parseFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } @@ -778,7 +769,7 @@ public final class JsProtoBuf { * */ public static final class Builder extends - GeneratedMessageLite.Builder< + com.google.protobuf.GeneratedMessageLite.Builder< org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library, Builder> implements org.jetbrains.kotlin.serialization.js.JsProtoBuf.LibraryOrBuilder { // Construct using org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.newBuilder() @@ -794,7 +785,7 @@ public final class JsProtoBuf { public Builder clear() { super.clear(); - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -804,7 +795,7 @@ public final class JsProtoBuf { } public org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library getDefaultInstanceForType() { - return getDefaultInstance(); + return org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.getDefaultInstance(); } public org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library build() { @@ -819,7 +810,7 @@ public final class JsProtoBuf { org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library result = new org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = Collections.unmodifiableList(entry_); + entry_ = java.util.Collections.unmodifiableList(entry_); bitField0_ = (bitField0_ & ~0x00000001); } result.entry_ = entry_; @@ -827,7 +818,7 @@ public final class JsProtoBuf { } public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library other) { - if (other == getDefaultInstance()) return this; + if (other == org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.getDefaultInstance()) return this; if (!other.entry_.isEmpty()) { if (entry_.isEmpty()) { entry_ = other.entry_; @@ -852,13 +843,13 @@ public final class JsProtoBuf { } public Builder mergeFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (InvalidProtocolBufferException e) { + } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library) e.getUnfinishedMessage(); throw e; } finally { @@ -871,11 +862,11 @@ public final class JsProtoBuf { private int bitField0_; // repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; - private List entry_ = - Collections.emptyList(); + private java.util.List entry_ = + java.util.Collections.emptyList(); private void ensureEntryIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - entry_ = new ArrayList(entry_); + entry_ = new java.util.ArrayList(entry_); bitField0_ |= 0x00000001; } } @@ -883,8 +874,8 @@ public final class JsProtoBuf { /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ - public List getEntryList() { - return Collections.unmodifiableList(entry_); + public java.util.List getEntryList() { + return java.util.Collections.unmodifiableList(entry_); } /** * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; @@ -970,9 +961,9 @@ public final class JsProtoBuf { * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ public Builder addAllEntry( - Iterable values) { + java.lang.Iterable values) { ensureEntryIsMutable(); - addAll(values, entry_); + super.addAll(values, entry_); return this; } @@ -980,7 +971,7 @@ public final class JsProtoBuf { * repeated .org.jetbrains.kotlin.serialization.js.Library.FileEntry entry = 1; */ public Builder clearEntry() { - entry_ = Collections.emptyList(); + entry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; diff --git a/core/serialization.jvm/src/jvm_descriptors.proto b/core/serialization.jvm/src/jvm_descriptors.proto index c22870ec47e..91b7f30c345 100644 --- a/core/serialization.jvm/src/jvm_descriptors.proto +++ b/core/serialization.jvm/src/jvm_descriptors.proto @@ -22,6 +22,8 @@ option java_outer_classname = "JvmProtoBuf"; option optimize_for = LITE_RUNTIME; message JvmType { + // Either a primitive type, or a class FQ name should be present + enum PrimitiveType { // These values correspond to ASM Type sorts VOID = 0; @@ -35,8 +37,9 @@ message JvmType { DOUBLE = 8; } - // One of these should be present optional PrimitiveType primitive_type = 1; + + // id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested' optional int32 class_fq_name = 2; optional int32 array_dimension = 3 [default = 0]; diff --git a/core/serialization.jvm/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java b/core/serialization.jvm/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java index 7134a6f8d5f..c79cc622a30 100644 --- a/core/serialization.jvm/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java +++ b/core/serialization.jvm/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java @@ -18,28 +18,28 @@ public final class JvmProtoBuf { // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ boolean hasPrimitiveType(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType(); // optional int32 class_fq_name = 2; /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ boolean hasClassFqName(); /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ int getClassFqName(); @@ -55,6 +55,10 @@ public final class JvmProtoBuf { } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} + * + *
+   * Either a primitive type, or a class FQ name should be present
+   * 
*/ public static final class JvmType extends com.google.protobuf.GeneratedMessageLite @@ -274,20 +278,12 @@ public final class JvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType primitiveType_; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ public boolean hasPrimitiveType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-     * One of these should be present
-     * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { return primitiveType_; @@ -298,12 +294,20 @@ public final class JvmProtoBuf { private int classFqName_; /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ public boolean hasClassFqName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 class_fq_name = 2; + * + *
+     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+     * 
*/ public int getClassFqName() { return classFqName_; @@ -444,6 +448,10 @@ public final class JvmProtoBuf { /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} + * + *
+     * Either a primitive type, or a class FQ name should be present
+     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< @@ -548,30 +556,18 @@ public final class JvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType primitiveType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.VOID; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public boolean hasPrimitiveType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { return primitiveType_; } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public Builder setPrimitiveType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType value) { if (value == null) { @@ -584,10 +580,6 @@ public final class JvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - * - *
-       * One of these should be present
-       * 
*/ public Builder clearPrimitiveType() { bitField0_ = (bitField0_ & ~0x00000001); @@ -600,18 +592,30 @@ public final class JvmProtoBuf { private int classFqName_ ; /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public boolean hasClassFqName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public int getClassFqName() { return classFqName_; } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public Builder setClassFqName(int value) { bitField0_ |= 0x00000002; @@ -621,6 +625,10 @@ public final class JvmProtoBuf { } /** * optional int32 class_fq_name = 2; + * + *
+       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
+       * 
*/ public Builder clearClassFqName() { bitField0_ = (bitField0_ & ~0x00000002); diff --git a/core/serialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java b/core/serialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java index 226574c94e3..958fd04e511 100644 --- a/core/serialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java +++ b/core/serialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java @@ -5007,10 +5007,18 @@ public final class ProtoBuf { // optional .org.jetbrains.kotlin.serialization.Type type = 2; /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ boolean hasType(); /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(); } @@ -5201,12 +5209,20 @@ public final class ProtoBuf { private org.jetbrains.kotlin.serialization.ProtoBuf.Type type_; /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+       * when projection is STAR, no type is written, otherwise type must be specified
+       * 
*/ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { return type_; @@ -5466,18 +5482,30 @@ public final class ProtoBuf { private org.jetbrains.kotlin.serialization.ProtoBuf.Type type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { return type_; } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder setType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (value == null) { @@ -5490,6 +5518,10 @@ public final class ProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder setType( org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { @@ -5500,6 +5532,10 @@ public final class ProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder mergeType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (((bitField0_ & 0x00000002) == 0x00000002) && @@ -5515,6 +5551,10 @@ public final class ProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.Type type = 2; + * + *
+         * when projection is STAR, no type is written, otherwise type must be specified
+         * 
*/ public Builder clearType() { type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance();