diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 8ee9b019d3c..4672c1e5dae 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -3,7 +3,6 @@ buildscript { val buildSrcKotlinVersion: String by extra(findProperty("buildSrc.kotlin.version")?.toString() ?: embeddedKotlinVersion) val buildSrcKotlinRepo: String? by extra(findProperty("buildSrc.kotlin.repo") as String?) extra["versions.shadow"] = "2.0.1" - extra["versions.protobuf-java"] = "2.6.1" repositories { buildSrcKotlinRepo?.let { @@ -47,7 +46,6 @@ dependencies { // compile("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["bootstrap_kotlin_version"]}") compile("com.github.jengelman.gradle.plugins:shadow:${property("versions.shadow")}") compile("org.ow2.asm:asm-all:6.0_BETA") - compile("com.google.protobuf:protobuf-java:${property("versions.protobuf-java")}") } samWithReceiver { diff --git a/buildSrc/src/main/java/org/jetbrains/kotlin/serialization/jvm/JvmPackageTable.java b/buildSrc/src/main/java/org/jetbrains/kotlin/serialization/jvm/JvmPackageTable.java deleted file mode 100644 index 7fea52c5042..00000000000 --- a/buildSrc/src/main/java/org/jetbrains/kotlin/serialization/jvm/JvmPackageTable.java +++ /dev/null @@ -1,2914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: core/descriptors.jvm/src/jvm_package_table.proto - -package org.jetbrains.kotlin.serialization.jvm; - -public final class JvmPackageTable { - private JvmPackageTable() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - public interface PackageTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.jvm.PackageTable) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - java.util.List - getPackagePartsList(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getPackageParts(int index); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - int getPackagePartsCount(); - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - java.util.List - getMetadataPartsList(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getMetadataParts(int index); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - int getMetadataPartsCount(); - - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - com.google.protobuf.ProtocolStringList - getJvmPackageNameList(); - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - int getJvmPackageNameCount(); - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - java.lang.String getJvmPackageName(int index); - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - com.google.protobuf.ByteString - getJvmPackageNameBytes(int index); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageTable} - */ - public static final class PackageTable extends - com.google.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.jvm.PackageTable) - PackageTableOrBuilder { - // Use PackageTable.newBuilder() to construct. - private PackageTable(com.google.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PackageTable(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} - - private static final PackageTable defaultInstance; - public static PackageTable getDefaultInstance() { - return defaultInstance; - } - - public PackageTable getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.ByteString unknownFields; - private PackageTable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.ByteString.Output unknownFieldsOutput = - com.google.protobuf.ByteString.newOutput(); - com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = - com.google.protobuf.CodedOutputStream.newInstance( - unknownFieldsOutput); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFieldsCodedOutput, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - packageParts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - packageParts_.add(input.readMessage(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.PARSER, extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - metadataParts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - metadataParts_.add(input.readMessage(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.PARSER, extensionRegistry)); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - jvmPackageName_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jvmPackageName_.add(bs); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - packageParts_ = java.util.Collections.unmodifiableList(packageParts_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - metadataParts_ = java.util.Collections.unmodifiableList(metadataParts_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - jvmPackageName_ = jvmPackageName_.getUnmodifiableView(); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PackageTable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PackageTable(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public static final int PACKAGE_PARTS_FIELD_NUMBER = 1; - private java.util.List packageParts_; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - public java.util.List getPackagePartsList() { - return packageParts_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - public java.util.List - getPackagePartsOrBuilderList() { - return packageParts_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - public int getPackagePartsCount() { - return packageParts_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getPackageParts(int index) { - return packageParts_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-     * Names of .class files for each package
-     * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackagePartsOrBuilder getPackagePartsOrBuilder( - int index) { - return packageParts_.get(index); - } - - public static final int METADATA_PARTS_FIELD_NUMBER = 2; - private java.util.List metadataParts_; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - public java.util.List getMetadataPartsList() { - return metadataParts_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - public java.util.List - getMetadataPartsOrBuilderList() { - return metadataParts_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - public int getMetadataPartsCount() { - return metadataParts_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getMetadataParts(int index) { - return metadataParts_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-     * Names of .kotlin_metadata files for each package
-     * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackagePartsOrBuilder getMetadataPartsOrBuilder( - int index) { - return metadataParts_.get(index); - } - - public static final int JVM_PACKAGE_NAME_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList jvmPackageName_; - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getJvmPackageNameList() { - return jvmPackageName_; - } - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - public int getJvmPackageNameCount() { - return jvmPackageName_.size(); - } - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - public java.lang.String getJvmPackageName(int index) { - return jvmPackageName_.get(index); - } - /** - * repeated string jvm_package_name = 3; - * - *
-     * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-     * The names here are dot-separated, e.g. "org.foo.bar"
-     * 
- */ - public com.google.protobuf.ByteString - getJvmPackageNameBytes(int index) { - return jvmPackageName_.getByteString(index); - } - - private void initFields() { - packageParts_ = java.util.Collections.emptyList(); - metadataParts_ = java.util.Collections.emptyList(); - jvmPackageName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - for (int i = 0; i < getPackagePartsCount(); i++) { - if (!getPackageParts(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getMetadataPartsCount(); i++) { - if (!getMetadataParts(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < packageParts_.size(); i++) { - output.writeMessage(1, packageParts_.get(i)); - } - for (int i = 0; i < metadataParts_.size(); i++) { - output.writeMessage(2, metadataParts_.get(i)); - } - for (int i = 0; i < jvmPackageName_.size(); i++) { - output.writeBytes(3, jvmPackageName_.getByteString(i)); - } - output.writeRawBytes(unknownFields); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < packageParts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, packageParts_.get(i)); - } - for (int i = 0; i < metadataParts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, metadataParts_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < jvmPackageName_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(jvmPackageName_.getByteString(i)); - } - size += dataSize; - size += 1 * getJvmPackageNameList().size(); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - 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.jvm.JvmPackageTable.PackageTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.jvm.PackageTable) - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTableOrBuilder { - // Construct using org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - packageParts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - metadataParts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - jvmPackageName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable build() { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable buildPartial() { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable result = new org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - packageParts_ = java.util.Collections.unmodifiableList(packageParts_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.packageParts_ = packageParts_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - metadataParts_ = java.util.Collections.unmodifiableList(metadataParts_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.metadataParts_ = metadataParts_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - jvmPackageName_ = jvmPackageName_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jvmPackageName_ = jvmPackageName_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable other) { - if (other == org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable.getDefaultInstance()) return this; - if (!other.packageParts_.isEmpty()) { - if (packageParts_.isEmpty()) { - packageParts_ = other.packageParts_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePackagePartsIsMutable(); - packageParts_.addAll(other.packageParts_); - } - - } - if (!other.metadataParts_.isEmpty()) { - if (metadataParts_.isEmpty()) { - metadataParts_ = other.metadataParts_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMetadataPartsIsMutable(); - metadataParts_.addAll(other.metadataParts_); - } - - } - if (!other.jvmPackageName_.isEmpty()) { - if (jvmPackageName_.isEmpty()) { - jvmPackageName_ = other.jvmPackageName_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJvmPackageNameIsMutable(); - jvmPackageName_.addAll(other.jvmPackageName_); - } - - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - for (int i = 0; i < getPackagePartsCount(); i++) { - if (!getPackageParts(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getMetadataPartsCount(); i++) { - if (!getMetadataParts(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageTable) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List packageParts_ = - java.util.Collections.emptyList(); - private void ensurePackagePartsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - packageParts_ = new java.util.ArrayList(packageParts_); - bitField0_ |= 0x00000001; - } - } - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public java.util.List getPackagePartsList() { - return java.util.Collections.unmodifiableList(packageParts_); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public int getPackagePartsCount() { - return packageParts_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getPackageParts(int index) { - return packageParts_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder setPackageParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackagePartsIsMutable(); - packageParts_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder setPackageParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensurePackagePartsIsMutable(); - packageParts_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder addPackageParts(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackagePartsIsMutable(); - packageParts_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder addPackageParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePackagePartsIsMutable(); - packageParts_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder addPackageParts( - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensurePackagePartsIsMutable(); - packageParts_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder addPackageParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensurePackagePartsIsMutable(); - packageParts_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder addAllPackageParts( - java.lang.Iterable values) { - ensurePackagePartsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, packageParts_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder clearPackageParts() { - packageParts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts package_parts = 1; - * - *
-       * Names of .class files for each package
-       * 
- */ - public Builder removePackageParts(int index) { - ensurePackagePartsIsMutable(); - packageParts_.remove(index); - - return this; - } - - private java.util.List metadataParts_ = - java.util.Collections.emptyList(); - private void ensureMetadataPartsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - metadataParts_ = new java.util.ArrayList(metadataParts_); - bitField0_ |= 0x00000002; - } - } - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public java.util.List getMetadataPartsList() { - return java.util.Collections.unmodifiableList(metadataParts_); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public int getMetadataPartsCount() { - return metadataParts_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getMetadataParts(int index) { - return metadataParts_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder setMetadataParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataPartsIsMutable(); - metadataParts_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder setMetadataParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensureMetadataPartsIsMutable(); - metadataParts_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder addMetadataParts(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataPartsIsMutable(); - metadataParts_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder addMetadataParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataPartsIsMutable(); - metadataParts_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder addMetadataParts( - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensureMetadataPartsIsMutable(); - metadataParts_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder addMetadataParts( - int index, org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.Builder builderForValue) { - ensureMetadataPartsIsMutable(); - metadataParts_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder addAllMetadataParts( - java.lang.Iterable values) { - ensureMetadataPartsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, metadataParts_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder clearMetadataParts() { - metadataParts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.PackageParts metadata_parts = 2; - * - *
-       * Names of .kotlin_metadata files for each package
-       * 
- */ - public Builder removeMetadataParts(int index) { - ensureMetadataPartsIsMutable(); - metadataParts_.remove(index); - - return this; - } - - private com.google.protobuf.LazyStringList jvmPackageName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureJvmPackageNameIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - jvmPackageName_ = new com.google.protobuf.LazyStringArrayList(jvmPackageName_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getJvmPackageNameList() { - return jvmPackageName_.getUnmodifiableView(); - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public int getJvmPackageNameCount() { - return jvmPackageName_.size(); - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public java.lang.String getJvmPackageName(int index) { - return jvmPackageName_.get(index); - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public com.google.protobuf.ByteString - getJvmPackageNameBytes(int index) { - return jvmPackageName_.getByteString(index); - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public Builder setJvmPackageName( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJvmPackageNameIsMutable(); - jvmPackageName_.set(index, value); - - return this; - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public Builder addJvmPackageName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJvmPackageNameIsMutable(); - jvmPackageName_.add(value); - - return this; - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public Builder addAllJvmPackageName( - java.lang.Iterable values) { - ensureJvmPackageNameIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, jvmPackageName_); - - return this; - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public Builder clearJvmPackageName() { - jvmPackageName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - - return this; - } - /** - * repeated string jvm_package_name = 3; - * - *
-       * Values of @JvmPackageName annotation used in this module; can be referenced in PackageParts#class_with_jvm_package_name_package_id.
-       * The names here are dot-separated, e.g. "org.foo.bar"
-       * 
- */ - public Builder addJvmPackageNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJvmPackageNameIsMutable(); - jvmPackageName_.add(value); - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.PackageTable) - } - - static { - defaultInstance = new PackageTable(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.jvm.PackageTable) - } - - public interface PackagePartsOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.jvm.PackageParts) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * required string package_fq_name = 1; - */ - boolean hasPackageFqName(); - /** - * required string package_fq_name = 1; - */ - java.lang.String getPackageFqName(); - /** - * required string package_fq_name = 1; - */ - com.google.protobuf.ByteString - getPackageFqNameBytes(); - - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getShortClassNameList(); - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - int getShortClassNameCount(); - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - java.lang.String getShortClassName(int index); - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - com.google.protobuf.ByteString - getShortClassNameBytes(int index); - - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - java.util.List getMultifileFacadeShortNameIdList(); - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - int getMultifileFacadeShortNameIdCount(); - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - int getMultifileFacadeShortNameId(int index); - - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getMultifileFacadeShortNameList(); - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - int getMultifileFacadeShortNameCount(); - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - java.lang.String getMultifileFacadeShortName(int index); - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - com.google.protobuf.ByteString - getMultifileFacadeShortNameBytes(int index); - - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getClassWithJvmPackageNameShortNameList(); - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - int getClassWithJvmPackageNameShortNameCount(); - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - java.lang.String getClassWithJvmPackageNameShortName(int index); - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - com.google.protobuf.ByteString - getClassWithJvmPackageNameShortNameBytes(int index); - - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - java.util.List getClassWithJvmPackageNamePackageIdList(); - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - int getClassWithJvmPackageNamePackageIdCount(); - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - int getClassWithJvmPackageNamePackageId(int index); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageParts} - */ - public static final class PackageParts extends - com.google.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.jvm.PackageParts) - PackagePartsOrBuilder { - // Use PackageParts.newBuilder() to construct. - private PackageParts(com.google.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PackageParts(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} - - private static final PackageParts defaultInstance; - public static PackageParts getDefaultInstance() { - return defaultInstance; - } - - public PackageParts getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.ByteString unknownFields; - private PackageParts( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.ByteString.Output unknownFieldsOutput = - com.google.protobuf.ByteString.newOutput(); - com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = - com.google.protobuf.CodedOutputStream.newInstance( - unknownFieldsOutput); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFieldsCodedOutput, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - packageFqName_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - shortClassName_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - shortClassName_.add(bs); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - multifileFacadeShortNameId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - multifileFacadeShortNameId_.add(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - multifileFacadeShortNameId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - multifileFacadeShortNameId_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - multifileFacadeShortName_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - multifileFacadeShortName_.add(bs); - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - classWithJvmPackageNameShortName_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - classWithJvmPackageNameShortName_.add(bs); - break; - } - case 48: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - classWithJvmPackageNamePackageId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - classWithJvmPackageNamePackageId_.add(input.readInt32()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { - classWithJvmPackageNamePackageId_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - classWithJvmPackageNamePackageId_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - shortClassName_ = shortClassName_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - multifileFacadeShortNameId_ = java.util.Collections.unmodifiableList(multifileFacadeShortNameId_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - multifileFacadeShortName_ = multifileFacadeShortName_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - classWithJvmPackageNameShortName_ = classWithJvmPackageNameShortName_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - classWithJvmPackageNamePackageId_ = java.util.Collections.unmodifiableList(classWithJvmPackageNamePackageId_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PackageParts parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PackageParts(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int PACKAGE_FQ_NAME_FIELD_NUMBER = 1; - private java.lang.Object packageFqName_; - /** - * required string package_fq_name = 1; - */ - public boolean hasPackageFqName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string package_fq_name = 1; - */ - public java.lang.String getPackageFqName() { - java.lang.Object ref = packageFqName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - packageFqName_ = s; - } - return s; - } - } - /** - * required string package_fq_name = 1; - */ - public com.google.protobuf.ByteString - getPackageFqNameBytes() { - java.lang.Object ref = packageFqName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageFqName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHORT_CLASS_NAME_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList shortClassName_; - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getShortClassNameList() { - return shortClassName_; - } - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - public int getShortClassNameCount() { - return shortClassName_.size(); - } - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - public java.lang.String getShortClassName(int index) { - return shortClassName_.get(index); - } - /** - * repeated string short_class_name = 2; - * - *
-     * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-     * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-     * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-     * 
- */ - public com.google.protobuf.ByteString - getShortClassNameBytes(int index) { - return shortClassName_.getByteString(index); - } - - public static final int MULTIFILE_FACADE_SHORT_NAME_ID_FIELD_NUMBER = 3; - private java.util.List multifileFacadeShortNameId_; - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - public java.util.List - getMultifileFacadeShortNameIdList() { - return multifileFacadeShortNameId_; - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - public int getMultifileFacadeShortNameIdCount() { - return multifileFacadeShortNameId_.size(); - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-     * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-     * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-     * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-     * 
- */ - public int getMultifileFacadeShortNameId(int index) { - return multifileFacadeShortNameId_.get(index); - } - private int multifileFacadeShortNameIdMemoizedSerializedSize = -1; - - public static final int MULTIFILE_FACADE_SHORT_NAME_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList multifileFacadeShortName_; - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getMultifileFacadeShortNameList() { - return multifileFacadeShortName_; - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - public int getMultifileFacadeShortNameCount() { - return multifileFacadeShortName_.size(); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - public java.lang.String getMultifileFacadeShortName(int index) { - return multifileFacadeShortName_.get(index); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-     * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-     * 
- */ - public com.google.protobuf.ByteString - getMultifileFacadeShortNameBytes(int index) { - return multifileFacadeShortName_.getByteString(index); - } - - public static final int CLASS_WITH_JVM_PACKAGE_NAME_SHORT_NAME_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList classWithJvmPackageNameShortName_; - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getClassWithJvmPackageNameShortNameList() { - return classWithJvmPackageNameShortName_; - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - public int getClassWithJvmPackageNameShortNameCount() { - return classWithJvmPackageNameShortName_.size(); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - public java.lang.String getClassWithJvmPackageNameShortName(int index) { - return classWithJvmPackageNameShortName_.get(index); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-     * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-     * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-     * 
- */ - public com.google.protobuf.ByteString - getClassWithJvmPackageNameShortNameBytes(int index) { - return classWithJvmPackageNameShortName_.getByteString(index); - } - - public static final int CLASS_WITH_JVM_PACKAGE_NAME_PACKAGE_ID_FIELD_NUMBER = 6; - private java.util.List classWithJvmPackageNamePackageId_; - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - public java.util.List - getClassWithJvmPackageNamePackageIdList() { - return classWithJvmPackageNamePackageId_; - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - public int getClassWithJvmPackageNamePackageIdCount() { - return classWithJvmPackageNamePackageId_.size(); - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-     * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-     * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-     * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-     * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-     * when a bunch of files from the same Kotlin package have the same JVM package name.
-     * 
- */ - public int getClassWithJvmPackageNamePackageId(int index) { - return classWithJvmPackageNamePackageId_.get(index); - } - private int classWithJvmPackageNamePackageIdMemoizedSerializedSize = -1; - - private void initFields() { - packageFqName_ = ""; - shortClassName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - multifileFacadeShortNameId_ = java.util.Collections.emptyList(); - multifileFacadeShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - classWithJvmPackageNameShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - classWithJvmPackageNamePackageId_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasPackageFqName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getPackageFqNameBytes()); - } - for (int i = 0; i < shortClassName_.size(); i++) { - output.writeBytes(2, shortClassName_.getByteString(i)); - } - if (getMultifileFacadeShortNameIdList().size() > 0) { - output.writeRawVarint32(26); - output.writeRawVarint32(multifileFacadeShortNameIdMemoizedSerializedSize); - } - for (int i = 0; i < multifileFacadeShortNameId_.size(); i++) { - output.writeInt32NoTag(multifileFacadeShortNameId_.get(i)); - } - for (int i = 0; i < multifileFacadeShortName_.size(); i++) { - output.writeBytes(4, multifileFacadeShortName_.getByteString(i)); - } - for (int i = 0; i < classWithJvmPackageNameShortName_.size(); i++) { - output.writeBytes(5, classWithJvmPackageNameShortName_.getByteString(i)); - } - if (getClassWithJvmPackageNamePackageIdList().size() > 0) { - output.writeRawVarint32(50); - output.writeRawVarint32(classWithJvmPackageNamePackageIdMemoizedSerializedSize); - } - for (int i = 0; i < classWithJvmPackageNamePackageId_.size(); i++) { - output.writeInt32NoTag(classWithJvmPackageNamePackageId_.get(i)); - } - output.writeRawBytes(unknownFields); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getPackageFqNameBytes()); - } - { - int dataSize = 0; - for (int i = 0; i < shortClassName_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(shortClassName_.getByteString(i)); - } - size += dataSize; - size += 1 * getShortClassNameList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < multifileFacadeShortNameId_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(multifileFacadeShortNameId_.get(i)); - } - size += dataSize; - if (!getMultifileFacadeShortNameIdList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - multifileFacadeShortNameIdMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < multifileFacadeShortName_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(multifileFacadeShortName_.getByteString(i)); - } - size += dataSize; - size += 1 * getMultifileFacadeShortNameList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < classWithJvmPackageNameShortName_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(classWithJvmPackageNameShortName_.getByteString(i)); - } - size += dataSize; - size += 1 * getClassWithJvmPackageNameShortNameList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < classWithJvmPackageNamePackageId_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(classWithJvmPackageNamePackageId_.get(i)); - } - size += dataSize; - if (!getClassWithJvmPackageNamePackageIdList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - classWithJvmPackageNamePackageIdMemoizedSerializedSize = dataSize; - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - 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.jvm.JvmPackageTable.PackageParts parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageParts} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.jvm.PackageParts) - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackagePartsOrBuilder { - // Construct using org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - packageFqName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - shortClassName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - multifileFacadeShortNameId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - multifileFacadeShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - classWithJvmPackageNameShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - classWithJvmPackageNamePackageId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts build() { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts buildPartial() { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts result = new org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.packageFqName_ = packageFqName_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - shortClassName_ = shortClassName_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.shortClassName_ = shortClassName_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - multifileFacadeShortNameId_ = java.util.Collections.unmodifiableList(multifileFacadeShortNameId_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.multifileFacadeShortNameId_ = multifileFacadeShortNameId_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - multifileFacadeShortName_ = multifileFacadeShortName_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.multifileFacadeShortName_ = multifileFacadeShortName_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - classWithJvmPackageNameShortName_ = classWithJvmPackageNameShortName_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.classWithJvmPackageNameShortName_ = classWithJvmPackageNameShortName_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - classWithJvmPackageNamePackageId_ = java.util.Collections.unmodifiableList(classWithJvmPackageNamePackageId_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.classWithJvmPackageNamePackageId_ = classWithJvmPackageNamePackageId_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts other) { - if (other == org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts.getDefaultInstance()) return this; - if (other.hasPackageFqName()) { - bitField0_ |= 0x00000001; - packageFqName_ = other.packageFqName_; - - } - if (!other.shortClassName_.isEmpty()) { - if (shortClassName_.isEmpty()) { - shortClassName_ = other.shortClassName_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureShortClassNameIsMutable(); - shortClassName_.addAll(other.shortClassName_); - } - - } - if (!other.multifileFacadeShortNameId_.isEmpty()) { - if (multifileFacadeShortNameId_.isEmpty()) { - multifileFacadeShortNameId_ = other.multifileFacadeShortNameId_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureMultifileFacadeShortNameIdIsMutable(); - multifileFacadeShortNameId_.addAll(other.multifileFacadeShortNameId_); - } - - } - if (!other.multifileFacadeShortName_.isEmpty()) { - if (multifileFacadeShortName_.isEmpty()) { - multifileFacadeShortName_ = other.multifileFacadeShortName_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMultifileFacadeShortNameIsMutable(); - multifileFacadeShortName_.addAll(other.multifileFacadeShortName_); - } - - } - if (!other.classWithJvmPackageNameShortName_.isEmpty()) { - if (classWithJvmPackageNameShortName_.isEmpty()) { - classWithJvmPackageNameShortName_ = other.classWithJvmPackageNameShortName_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureClassWithJvmPackageNameShortNameIsMutable(); - classWithJvmPackageNameShortName_.addAll(other.classWithJvmPackageNameShortName_); - } - - } - if (!other.classWithJvmPackageNamePackageId_.isEmpty()) { - if (classWithJvmPackageNamePackageId_.isEmpty()) { - classWithJvmPackageNamePackageId_ = other.classWithJvmPackageNamePackageId_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureClassWithJvmPackageNamePackageIdIsMutable(); - classWithJvmPackageNamePackageId_.addAll(other.classWithJvmPackageNamePackageId_); - } - - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasPackageFqName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.jvm.JvmPackageTable.PackageParts) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object packageFqName_ = ""; - /** - * required string package_fq_name = 1; - */ - public boolean hasPackageFqName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string package_fq_name = 1; - */ - public java.lang.String getPackageFqName() { - java.lang.Object ref = packageFqName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - packageFqName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string package_fq_name = 1; - */ - public com.google.protobuf.ByteString - getPackageFqNameBytes() { - java.lang.Object ref = packageFqName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - packageFqName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string package_fq_name = 1; - */ - public Builder setPackageFqName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - packageFqName_ = value; - - return this; - } - /** - * required string package_fq_name = 1; - */ - public Builder clearPackageFqName() { - bitField0_ = (bitField0_ & ~0x00000001); - packageFqName_ = getDefaultInstance().getPackageFqName(); - - return this; - } - /** - * required string package_fq_name = 1; - */ - public Builder setPackageFqNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - packageFqName_ = value; - - return this; - } - - private com.google.protobuf.LazyStringList shortClassName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureShortClassNameIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - shortClassName_ = new com.google.protobuf.LazyStringArrayList(shortClassName_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getShortClassNameList() { - return shortClassName_.getUnmodifiableView(); - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public int getShortClassNameCount() { - return shortClassName_.size(); - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public java.lang.String getShortClassName(int index) { - return shortClassName_.get(index); - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public com.google.protobuf.ByteString - getShortClassNameBytes(int index) { - return shortClassName_.getByteString(index); - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public Builder setShortClassName( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureShortClassNameIsMutable(); - shortClassName_.set(index, value); - - return this; - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public Builder addShortClassName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureShortClassNameIsMutable(); - shortClassName_.add(value); - - return this; - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public Builder addAllShortClassName( - java.lang.Iterable values) { - ensureShortClassNameIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, shortClassName_); - - return this; - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public Builder clearShortClassName() { - shortClassName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - - return this; - } - /** - * repeated string short_class_name = 2; - * - *
-       * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
-       * (multi-file facades are not present in this list, they are defined below). Only files whose JVM package name is equal to the
-       * Kotlin package name (i.e. it has not been changed with @JvmPackageName) are listed here.
-       * 
- */ - public Builder addShortClassNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureShortClassNameIsMutable(); - shortClassName_.add(value); - - return this; - } - - private java.util.List multifileFacadeShortNameId_ = java.util.Collections.emptyList(); - private void ensureMultifileFacadeShortNameIdIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - multifileFacadeShortNameId_ = new java.util.ArrayList(multifileFacadeShortNameId_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public java.util.List - getMultifileFacadeShortNameIdList() { - return java.util.Collections.unmodifiableList(multifileFacadeShortNameId_); - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public int getMultifileFacadeShortNameIdCount() { - return multifileFacadeShortNameId_.size(); - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public int getMultifileFacadeShortNameId(int index) { - return multifileFacadeShortNameId_.get(index); - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public Builder setMultifileFacadeShortNameId( - int index, int value) { - ensureMultifileFacadeShortNameIdIsMutable(); - multifileFacadeShortNameId_.set(index, value); - - return this; - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public Builder addMultifileFacadeShortNameId(int value) { - ensureMultifileFacadeShortNameIdIsMutable(); - multifileFacadeShortNameId_.add(value); - - return this; - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public Builder addAllMultifileFacadeShortNameId( - java.lang.Iterable values) { - ensureMultifileFacadeShortNameIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, multifileFacadeShortNameId_); - - return this; - } - /** - * repeated int32 multifile_facade_short_name_id = 3 [packed = true]; - * - *
-       * For each name in short_class_name, index of the name of the corresponding multi-file facade class in multifile_facade_short_name + 1,
-       * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0.
-       * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all)
-       * 
- */ - public Builder clearMultifileFacadeShortNameId() { - multifileFacadeShortNameId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - - return this; - } - - private com.google.protobuf.LazyStringList multifileFacadeShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureMultifileFacadeShortNameIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - multifileFacadeShortName_ = new com.google.protobuf.LazyStringArrayList(multifileFacadeShortName_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getMultifileFacadeShortNameList() { - return multifileFacadeShortName_.getUnmodifiableView(); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public int getMultifileFacadeShortNameCount() { - return multifileFacadeShortName_.size(); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public java.lang.String getMultifileFacadeShortName(int index) { - return multifileFacadeShortName_.get(index); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public com.google.protobuf.ByteString - getMultifileFacadeShortNameBytes(int index) { - return multifileFacadeShortName_.getByteString(index); - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public Builder setMultifileFacadeShortName( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMultifileFacadeShortNameIsMutable(); - multifileFacadeShortName_.set(index, value); - - return this; - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public Builder addMultifileFacadeShortName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMultifileFacadeShortNameIsMutable(); - multifileFacadeShortName_.add(value); - - return this; - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public Builder addAllMultifileFacadeShortName( - java.lang.Iterable values) { - ensureMultifileFacadeShortNameIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, multifileFacadeShortName_); - - return this; - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public Builder clearMultifileFacadeShortName() { - multifileFacadeShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated string multifile_facade_short_name = 4; - * - *
-       * Short names of multi-file facades, used in multifile_facade_short_name_id to store the part -> facade mapping.
-       * 
- */ - public Builder addMultifileFacadeShortNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMultifileFacadeShortNameIsMutable(); - multifileFacadeShortName_.add(value); - - return this; - } - - private com.google.protobuf.LazyStringList classWithJvmPackageNameShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureClassWithJvmPackageNameShortNameIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - classWithJvmPackageNameShortName_ = new com.google.protobuf.LazyStringArrayList(classWithJvmPackageNameShortName_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getClassWithJvmPackageNameShortNameList() { - return classWithJvmPackageNameShortName_.getUnmodifiableView(); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public int getClassWithJvmPackageNameShortNameCount() { - return classWithJvmPackageNameShortName_.size(); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public java.lang.String getClassWithJvmPackageNameShortName(int index) { - return classWithJvmPackageNameShortName_.get(index); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public com.google.protobuf.ByteString - getClassWithJvmPackageNameShortNameBytes(int index) { - return classWithJvmPackageNameShortName_.getByteString(index); - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public Builder setClassWithJvmPackageNameShortName( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureClassWithJvmPackageNameShortNameIsMutable(); - classWithJvmPackageNameShortName_.set(index, value); - - return this; - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public Builder addClassWithJvmPackageNameShortName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureClassWithJvmPackageNameShortNameIsMutable(); - classWithJvmPackageNameShortName_.add(value); - - return this; - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public Builder addAllClassWithJvmPackageNameShortName( - java.lang.Iterable values) { - ensureClassWithJvmPackageNameShortNameIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, classWithJvmPackageNameShortName_); - - return this; - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public Builder clearClassWithJvmPackageNameShortName() { - classWithJvmPackageNameShortName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - - return this; - } - /** - * repeated string class_with_jvm_package_name_short_name = 5; - * - *
-       * Short names of files (single file facades), whose JVM package differs from the Kotlin package because of @JvmPackageName.
-       * The JVM package name of each file is stored at the same index in class_with_jvm_package_name_package_id.
-       * 
- */ - public Builder addClassWithJvmPackageNameShortNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureClassWithJvmPackageNameShortNameIsMutable(); - classWithJvmPackageNameShortName_.add(value); - - return this; - } - - private java.util.List classWithJvmPackageNamePackageId_ = java.util.Collections.emptyList(); - private void ensureClassWithJvmPackageNamePackageIdIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - classWithJvmPackageNamePackageId_ = new java.util.ArrayList(classWithJvmPackageNamePackageId_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public java.util.List - getClassWithJvmPackageNamePackageIdList() { - return java.util.Collections.unmodifiableList(classWithJvmPackageNamePackageId_); - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public int getClassWithJvmPackageNamePackageIdCount() { - return classWithJvmPackageNamePackageId_.size(); - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public int getClassWithJvmPackageNamePackageId(int index) { - return classWithJvmPackageNamePackageId_.get(index); - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public Builder setClassWithJvmPackageNamePackageId( - int index, int value) { - ensureClassWithJvmPackageNamePackageIdIsMutable(); - classWithJvmPackageNamePackageId_.set(index, value); - - return this; - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public Builder addClassWithJvmPackageNamePackageId(int value) { - ensureClassWithJvmPackageNamePackageIdIsMutable(); - classWithJvmPackageNamePackageId_.add(value); - - return this; - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public Builder addAllClassWithJvmPackageNamePackageId( - java.lang.Iterable values) { - ensureClassWithJvmPackageNamePackageIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, classWithJvmPackageNamePackageId_); - - return this; - } - /** - * repeated int32 class_with_jvm_package_name_package_id = 6 [packed = true]; - * - *
-       * For each name in class_with_jvm_package_name_short_name, the index (into PackageTable#jvm_package_name) of the JVM package name.
-       * This list should have at least one element, otherwise classes with JVM package names are going to be ignored completely.
-       * If there's no value in this list at some index other than 0, the value is assumed to be the same as the value of the last element
-       * of this list. The intended use case for this optimization is to have just a list of a single element in the most frequent case
-       * when a bunch of files from the same Kotlin package have the same JVM package name.
-       * 
- */ - public Builder clearClassWithJvmPackageNamePackageId() { - classWithJvmPackageNamePackageId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.PackageParts) - } - - static { - defaultInstance = new PackageParts(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.jvm.PackageParts) - } - - - static { - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/buildSrc/src/main/kotlin/KotlinModuleShadowTransformer.kt b/buildSrc/src/main/kotlin/KotlinModuleShadowTransformer.kt deleted file mode 100644 index b6797ad126c..00000000000 --- a/buildSrc/src/main/kotlin/KotlinModuleShadowTransformer.kt +++ /dev/null @@ -1,62 +0,0 @@ -import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer -import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext -import org.gradle.api.file.FileTreeElement -import org.gradle.api.logging.Logger -import org.jetbrains.kotlin.serialization.jvm.JvmPackageTable -import shadow.org.apache.tools.zip.ZipEntry -import shadow.org.apache.tools.zip.ZipOutputStream -import java.io.ByteArrayOutputStream -import java.io.DataInputStream -import java.io.DataOutputStream - -class KotlinModuleShadowTransformer(private val logger: Logger) : Transformer { - private data class Entry(val path: String, val bytes: ByteArray) - private val data = mutableListOf() - - override fun canTransformResource(element: FileTreeElement): Boolean = - element.path.substringAfterLast(".") == KOTLIN_MODULE - - override fun transform(context: TransformerContext) { - fun relocate(content: String): String = - context.relocators.fold(content) { acc, relocator -> relocator.applyToSourceContent(acc) } - - val input = DataInputStream(context.`is`) - val version = IntArray(input.readInt()) { input.readInt() } - logger.info("Transforming ${context.path} with version ${version.toList()}") - - val table = JvmPackageTable.PackageTable.parseFrom(context.`is`).toBuilder() - - val newTable = JvmPackageTable.PackageTable.newBuilder().apply { - for (packageParts in table.packagePartsList + table.metadataPartsList) { - addPackageParts(JvmPackageTable.PackageParts.newBuilder(packageParts).apply { - packageFqName = relocate(packageFqName) - }) - } - addAllJvmPackageName(table.jvmPackageNameList.map(::relocate)) - } - - val baos = ByteArrayOutputStream() - val output = DataOutputStream(baos) - output.writeInt(version.size) - version.forEach(output::writeInt) - newTable.build().writeTo(output) - output.flush() - - data += Entry(context.path, baos.toByteArray()) - } - - override fun hasTransformedResource(): Boolean = - data.isNotEmpty() - - override fun modifyOutputStream(os: ZipOutputStream) { - for ((path, bytes) in data) { - os.putNextEntry(ZipEntry(path)) - os.write(bytes) - } - data.clear() - } - - companion object { - const val KOTLIN_MODULE = "kotlin_module" - } -} diff --git a/generators/src/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBuf.kt b/generators/src/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBuf.kt index 78dedc93f8e..db2d917c98a 100644 --- a/generators/src/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBuf.kt +++ b/generators/src/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBuf.kt @@ -73,8 +73,6 @@ fun main(args: Array) { modifyAndExecProtoc(protoPath) } - generateJvmPackageTableToBuildSrc() - println() println("Do not forget to run GenerateProtoBufCompare") } @@ -161,7 +159,3 @@ private fun modifyForDebug(protoPath: ProtoPath): String { } return text } - -private fun generateJvmPackageTableToBuildSrc() { - execProtoc("core/descriptors.jvm/src/jvm_package_table.proto", "buildSrc/src/main/java") -} diff --git a/libraries/reflect/build.gradle.kts b/libraries/reflect/build.gradle.kts index 09f0da53a12..569043fe490 100644 --- a/libraries/reflect/build.gradle.kts +++ b/libraries/reflect/build.gradle.kts @@ -1,5 +1,13 @@ +import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext +import org.jetbrains.kotlin.serialization.jvm.JvmPackageTable import proguard.gradle.ProGuardTask +import shadow.org.apache.tools.zip.ZipEntry +import shadow.org.apache.tools.zip.ZipOutputStream +import java.io.ByteArrayOutputStream +import java.io.DataInputStream +import java.io.DataOutputStream description = "Kotlin Full Reflection Library" @@ -63,6 +71,59 @@ val copyAnnotations by task { tasks.getByName("compileJava").dependsOn(copyAnnotations) +class KotlinModuleShadowTransformer(private val logger: Logger) : Transformer { + @Suppress("ArrayInDataClass") + private data class Entry(val path: String, val bytes: ByteArray) + private val data = mutableListOf() + + override fun canTransformResource(element: FileTreeElement): Boolean = + element.path.substringAfterLast(".") == KOTLIN_MODULE + + override fun transform(context: TransformerContext) { + fun relocate(content: String): String = + context.relocators.fold(content) { acc, relocator -> relocator.applyToSourceContent(acc) } + + val input = DataInputStream(context.`is`) + val version = IntArray(input.readInt()) { input.readInt() } + logger.info("Transforming ${context.path} with version ${version.toList()}") + + val table = JvmPackageTable.PackageTable.parseFrom(context.`is`).toBuilder() + + val newTable = JvmPackageTable.PackageTable.newBuilder().apply { + for (packageParts in table.packagePartsList + table.metadataPartsList) { + addPackageParts(JvmPackageTable.PackageParts.newBuilder(packageParts).apply { + packageFqName = relocate(packageFqName) + }) + } + addAllJvmPackageName(table.jvmPackageNameList.map(::relocate)) + } + + val baos = ByteArrayOutputStream() + val output = DataOutputStream(baos) + output.writeInt(version.size) + version.forEach(output::writeInt) + newTable.build().writeTo(output) + output.flush() + + data += Entry(context.path, baos.toByteArray()) + } + + override fun hasTransformedResource(): Boolean = + data.isNotEmpty() + + override fun modifyOutputStream(os: ZipOutputStream) { + for ((path, bytes) in data) { + os.putNextEntry(ZipEntry(path)) + os.write(bytes) + } + data.clear() + } + + companion object { + const val KOTLIN_MODULE = "kotlin_module" + } +} + val reflectShadowJar by task { classifier = "shadow" version = null