Minor, rename protobuf field according to style guide

This commit is contained in:
Alexander Udalov
2016-06-27 20:18:57 +03:00
parent 4c8e8b099a
commit 601dc96a34
4 changed files with 152 additions and 152 deletions
@@ -588,23 +588,23 @@ public final class DebugJsProtoBuf {
org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind getKind(); org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind getKind();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
org.jetbrains.kotlin.protobuf.ProtocolStringList org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList(); getImportedModuleList();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
int getImportedModulesCount(); int getImportedModuleCount();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
java.lang.String getImportedModules(int index); java.lang.String getImportedModule(int index);
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
org.jetbrains.kotlin.protobuf.ByteString org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index); getImportedModuleBytes(int index);
} }
/** /**
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library} * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library}
@@ -680,10 +680,10 @@ public final class DebugJsProtoBuf {
case 26: { case 26: {
org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); importedModule_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004; mutable_bitField0_ |= 0x00000004;
} }
importedModules_.add(bs); importedModule_.add(bs);
break; break;
} }
} }
@@ -698,7 +698,7 @@ public final class DebugJsProtoBuf {
entry_ = java.util.Collections.unmodifiableList(entry_); entry_ = java.util.Collections.unmodifiableList(entry_);
} }
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = importedModules_.getUnmodifiableView(); importedModule_ = importedModule_.getUnmodifiableView();
} }
this.unknownFields = unknownFields.build(); this.unknownFields = unknownFields.build();
makeExtensionsImmutable(); makeExtensionsImmutable();
@@ -1455,39 +1455,39 @@ public final class DebugJsProtoBuf {
return kind_; return kind_;
} }
public static final int IMPORTEDMODULES_FIELD_NUMBER = 3; public static final int IMPORTED_MODULE_FIELD_NUMBER = 3;
private org.jetbrains.kotlin.protobuf.LazyStringList importedModules_; private org.jetbrains.kotlin.protobuf.LazyStringList importedModule_;
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ProtocolStringList public org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList() { getImportedModuleList() {
return importedModules_; return importedModule_;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public int getImportedModulesCount() { public int getImportedModuleCount() {
return importedModules_.size(); return importedModule_.size();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public java.lang.String getImportedModules(int index) { public java.lang.String getImportedModule(int index) {
return importedModules_.get(index); return importedModule_.get(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ByteString public org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index) { getImportedModuleBytes(int index) {
return importedModules_.getByteString(index); return importedModule_.getByteString(index);
} }
private void initFields() { private void initFields() {
entry_ = java.util.Collections.emptyList(); entry_ = java.util.Collections.emptyList();
kind_ = org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind.PLAIN; kind_ = org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind.PLAIN;
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@@ -1514,8 +1514,8 @@ public final class DebugJsProtoBuf {
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(2, kind_.getNumber()); output.writeEnum(2, kind_.getNumber());
} }
for (int i = 0; i < importedModules_.size(); i++) { for (int i = 0; i < importedModule_.size(); i++) {
output.writeBytes(3, importedModules_.getByteString(i)); output.writeBytes(3, importedModule_.getByteString(i));
} }
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@@ -1536,12 +1536,12 @@ public final class DebugJsProtoBuf {
} }
{ {
int dataSize = 0; int dataSize = 0;
for (int i = 0; i < importedModules_.size(); i++) { for (int i = 0; i < importedModule_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBytesSizeNoTag(importedModules_.getByteString(i)); .computeBytesSizeNoTag(importedModule_.getByteString(i));
} }
size += dataSize; size += dataSize;
size += 1 * getImportedModulesList().size(); size += 1 * getImportedModuleList().size();
} }
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -1669,7 +1669,7 @@ public final class DebugJsProtoBuf {
} }
kind_ = org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind.PLAIN; kind_ = org.jetbrains.kotlin.serialization.js.DebugJsProtoBuf.Library.Kind.PLAIN;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
return this; return this;
} }
@@ -1713,10 +1713,10 @@ public final class DebugJsProtoBuf {
} }
result.kind_ = kind_; result.kind_ = kind_;
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = importedModules_.getUnmodifiableView(); importedModule_ = importedModule_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
} }
result.importedModules_ = importedModules_; result.importedModule_ = importedModule_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
onBuilt(); onBuilt();
return result; return result;
@@ -1762,13 +1762,13 @@ public final class DebugJsProtoBuf {
if (other.hasKind()) { if (other.hasKind()) {
setKind(other.getKind()); setKind(other.getKind());
} }
if (!other.importedModules_.isEmpty()) { if (!other.importedModule_.isEmpty()) {
if (importedModules_.isEmpty()) { if (importedModule_.isEmpty()) {
importedModules_ = other.importedModules_; importedModule_ = other.importedModule_;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
} else { } else {
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.addAll(other.importedModules_); importedModule_.addAll(other.importedModule_);
} }
onChanged(); onChanged();
} }
@@ -2080,95 +2080,95 @@ public final class DebugJsProtoBuf {
return this; return this;
} }
private org.jetbrains.kotlin.protobuf.LazyStringList importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; private org.jetbrains.kotlin.protobuf.LazyStringList importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
private void ensureImportedModulesIsMutable() { private void ensureImportedModuleIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) { if (!((bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(importedModules_); importedModule_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(importedModule_);
bitField0_ |= 0x00000004; bitField0_ |= 0x00000004;
} }
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ProtocolStringList public org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList() { getImportedModuleList() {
return importedModules_.getUnmodifiableView(); return importedModule_.getUnmodifiableView();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public int getImportedModulesCount() { public int getImportedModuleCount() {
return importedModules_.size(); return importedModule_.size();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public java.lang.String getImportedModules(int index) { public java.lang.String getImportedModule(int index) {
return importedModules_.get(index); return importedModule_.get(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ByteString public org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index) { getImportedModuleBytes(int index) {
return importedModules_.getByteString(index); return importedModule_.getByteString(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder setImportedModules( public Builder setImportedModule(
int index, java.lang.String value) { int index, java.lang.String value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.set(index, value); importedModule_.set(index, value);
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addImportedModules( public Builder addImportedModule(
java.lang.String value) { java.lang.String value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.add(value); importedModule_.add(value);
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addAllImportedModules( public Builder addAllImportedModule(
java.lang.Iterable<java.lang.String> values) { java.lang.Iterable<java.lang.String> values) {
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, importedModules_); values, importedModule_);
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder clearImportedModules() { public Builder clearImportedModule() {
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addImportedModulesBytes( public Builder addImportedModuleBytes(
org.jetbrains.kotlin.protobuf.ByteString value) { org.jetbrains.kotlin.protobuf.ByteString value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.add(value); importedModule_.add(value);
onChanged(); onChanged();
return this; return this;
} }
@@ -2315,7 +2315,7 @@ public final class DebugJsProtoBuf {
"ains.kotlin.serialization.js.Library.Fil" + "ains.kotlin.serialization.js.Library.Fil" +
"eEntry\022H\n\004kind\030\002 \001(\01623.org.jetbrains.kot" + "eEntry\022H\n\004kind\030\002 \001(\01623.org.jetbrains.kot" +
"lin.serialization.js.Library.Kind:\005PLAIN" + "lin.serialization.js.Library.Kind:\005PLAIN" +
"\022\027\n\017importedModules\030\003 \003(\t\032*\n\tFileEntry\022\014" + "\022\027\n\017imported_module\030\003 \003(\t\032*\n\tFileEntry\022\014" +
"\n\004path\030\001 \002(\t\022\017\n\007content\030\002 \002(\014\"2\n\004Kind\022\t\n", "\n\004path\030\001 \002(\t\022\017\n\007content\030\002 \002(\014\"2\n\004Kind\022\t\n",
"\005PLAIN\020\001\022\007\n\003AMD\020\002\022\r\n\tCOMMON_JS\020\003\022\007\n\003UMD\020" + "\005PLAIN\020\001\022\007\n\003AMD\020\002\022\r\n\tCOMMON_JS\020\003\022\007\n\003UMD\020" +
"\004:t\n\020class_annotation\022).org.jetbrains.ko" + "\004:t\n\020class_annotation\022).org.jetbrains.ko" +
@@ -2373,7 +2373,7 @@ public final class DebugJsProtoBuf {
internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_serialization_js_Library_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor, internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor,
new java.lang.String[] { "Entry", "Kind", "ImportedModules", }); new java.lang.String[] { "Entry", "Kind", "ImportedModule", });
internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor = internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_descriptor =
internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor.getNestedTypes().get(0); internal_static_org_jetbrains_kotlin_serialization_js_Library_descriptor.getNestedTypes().get(0);
internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_serialization_js_Library_FileEntry_fieldAccessorTable = new
+1 -1
View File
@@ -74,5 +74,5 @@ message Library {
repeated FileEntry entry = 1; repeated FileEntry entry = 1;
optional Kind kind = 2 [default = PLAIN]; optional Kind kind = 2 [default = PLAIN];
repeated string importedModules = 3; repeated string imported_module = 3;
} }
@@ -533,23 +533,23 @@ public final class JsProtoBuf {
org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind getKind(); org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind getKind();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
org.jetbrains.kotlin.protobuf.ProtocolStringList org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList(); getImportedModuleList();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
int getImportedModulesCount(); int getImportedModuleCount();
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
java.lang.String getImportedModules(int index); java.lang.String getImportedModule(int index);
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
org.jetbrains.kotlin.protobuf.ByteString org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index); getImportedModuleBytes(int index);
} }
/** /**
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library} * Protobuf type {@code org.jetbrains.kotlin.serialization.js.Library}
@@ -624,10 +624,10 @@ public final class JsProtoBuf {
case 26: { case 26: {
org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); importedModule_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004; mutable_bitField0_ |= 0x00000004;
} }
importedModules_.add(bs); importedModule_.add(bs);
break; break;
} }
} }
@@ -642,7 +642,7 @@ public final class JsProtoBuf {
entry_ = java.util.Collections.unmodifiableList(entry_); entry_ = java.util.Collections.unmodifiableList(entry_);
} }
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = importedModules_.getUnmodifiableView(); importedModule_ = importedModule_.getUnmodifiableView();
} }
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
@@ -1322,39 +1322,39 @@ public final class JsProtoBuf {
return kind_; return kind_;
} }
public static final int IMPORTEDMODULES_FIELD_NUMBER = 3; public static final int IMPORTED_MODULE_FIELD_NUMBER = 3;
private org.jetbrains.kotlin.protobuf.LazyStringList importedModules_; private org.jetbrains.kotlin.protobuf.LazyStringList importedModule_;
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ProtocolStringList public org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList() { getImportedModuleList() {
return importedModules_; return importedModule_;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public int getImportedModulesCount() { public int getImportedModuleCount() {
return importedModules_.size(); return importedModule_.size();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public java.lang.String getImportedModules(int index) { public java.lang.String getImportedModule(int index) {
return importedModules_.get(index); return importedModule_.get(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ByteString public org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index) { getImportedModuleBytes(int index) {
return importedModules_.getByteString(index); return importedModule_.getByteString(index);
} }
private void initFields() { private void initFields() {
entry_ = java.util.Collections.emptyList(); entry_ = java.util.Collections.emptyList();
kind_ = org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind.PLAIN; kind_ = org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind.PLAIN;
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@@ -1381,8 +1381,8 @@ public final class JsProtoBuf {
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(2, kind_.getNumber()); output.writeEnum(2, kind_.getNumber());
} }
for (int i = 0; i < importedModules_.size(); i++) { for (int i = 0; i < importedModule_.size(); i++) {
output.writeBytes(3, importedModules_.getByteString(i)); output.writeBytes(3, importedModule_.getByteString(i));
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
} }
@@ -1403,12 +1403,12 @@ public final class JsProtoBuf {
} }
{ {
int dataSize = 0; int dataSize = 0;
for (int i = 0; i < importedModules_.size(); i++) { for (int i = 0; i < importedModule_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBytesSizeNoTag(importedModules_.getByteString(i)); .computeBytesSizeNoTag(importedModule_.getByteString(i));
} }
size += dataSize; size += dataSize;
size += 1 * getImportedModulesList().size(); size += 1 * getImportedModuleList().size();
} }
size += unknownFields.size(); size += unknownFields.size();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -1508,7 +1508,7 @@ public final class JsProtoBuf {
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
kind_ = org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind.PLAIN; kind_ = org.jetbrains.kotlin.serialization.js.JsProtoBuf.Library.Kind.PLAIN;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
return this; return this;
} }
@@ -1543,10 +1543,10 @@ public final class JsProtoBuf {
} }
result.kind_ = kind_; result.kind_ = kind_;
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = importedModules_.getUnmodifiableView(); importedModule_ = importedModule_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
} }
result.importedModules_ = importedModules_; result.importedModule_ = importedModule_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
return result; return result;
} }
@@ -1566,13 +1566,13 @@ public final class JsProtoBuf {
if (other.hasKind()) { if (other.hasKind()) {
setKind(other.getKind()); setKind(other.getKind());
} }
if (!other.importedModules_.isEmpty()) { if (!other.importedModule_.isEmpty()) {
if (importedModules_.isEmpty()) { if (importedModule_.isEmpty()) {
importedModules_ = other.importedModules_; importedModule_ = other.importedModule_;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
} else { } else {
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.addAll(other.importedModules_); importedModule_.addAll(other.importedModule_);
} }
} }
@@ -1770,95 +1770,95 @@ public final class JsProtoBuf {
return this; return this;
} }
private org.jetbrains.kotlin.protobuf.LazyStringList importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; private org.jetbrains.kotlin.protobuf.LazyStringList importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
private void ensureImportedModulesIsMutable() { private void ensureImportedModuleIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) { if (!((bitField0_ & 0x00000004) == 0x00000004)) {
importedModules_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(importedModules_); importedModule_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(importedModule_);
bitField0_ |= 0x00000004; bitField0_ |= 0x00000004;
} }
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ProtocolStringList public org.jetbrains.kotlin.protobuf.ProtocolStringList
getImportedModulesList() { getImportedModuleList() {
return importedModules_.getUnmodifiableView(); return importedModule_.getUnmodifiableView();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public int getImportedModulesCount() { public int getImportedModuleCount() {
return importedModules_.size(); return importedModule_.size();
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public java.lang.String getImportedModules(int index) { public java.lang.String getImportedModule(int index) {
return importedModules_.get(index); return importedModule_.get(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public org.jetbrains.kotlin.protobuf.ByteString public org.jetbrains.kotlin.protobuf.ByteString
getImportedModulesBytes(int index) { getImportedModuleBytes(int index) {
return importedModules_.getByteString(index); return importedModule_.getByteString(index);
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder setImportedModules( public Builder setImportedModule(
int index, java.lang.String value) { int index, java.lang.String value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.set(index, value); importedModule_.set(index, value);
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addImportedModules( public Builder addImportedModule(
java.lang.String value) { java.lang.String value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.add(value); importedModule_.add(value);
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addAllImportedModules( public Builder addAllImportedModule(
java.lang.Iterable<java.lang.String> values) { java.lang.Iterable<java.lang.String> values) {
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, importedModules_); values, importedModule_);
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder clearImportedModules() { public Builder clearImportedModule() {
importedModules_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; importedModule_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
return this; return this;
} }
/** /**
* <code>repeated string importedModules = 3;</code> * <code>repeated string imported_module = 3;</code>
*/ */
public Builder addImportedModulesBytes( public Builder addImportedModuleBytes(
org.jetbrains.kotlin.protobuf.ByteString value) { org.jetbrains.kotlin.protobuf.ByteString value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
ensureImportedModulesIsMutable(); ensureImportedModuleIsMutable();
importedModules_.add(value); importedModule_.add(value);
return this; return this;
} }
@@ -95,7 +95,7 @@ object KotlinJavascriptSerializationUtil {
ModuleKind.UMD -> JsProtoBuf.Library.Kind.UMD ModuleKind.UMD -> JsProtoBuf.Library.Kind.UMD
} }
importedModules.forEach { contentBuilder.addImportedModules(it) } importedModules.forEach { contentBuilder.addImportedModule(it) }
contentMap.forEach { contentMap.forEach {
val entry = JsProtoBuf.Library.FileEntry.newBuilder().setPath(it.key).setContent(ByteString.copyFrom(it.value)).build() val entry = JsProtoBuf.Library.FileEntry.newBuilder().setPath(it.key).setContent(ByteString.copyFrom(it.value)).build()
@@ -251,6 +251,6 @@ private fun ByteArray.readAsContentMap(name: String): JsModuleDescriptor<Map<Str
JsProtoBuf.Library.Kind.COMMON_JS -> ModuleKind.COMMON_JS JsProtoBuf.Library.Kind.COMMON_JS -> ModuleKind.COMMON_JS
JsProtoBuf.Library.Kind.UMD -> ModuleKind.UMD JsProtoBuf.Library.Kind.UMD -> ModuleKind.UMD
}, },
imported = content.importedModulesList imported = content.importedModuleList
) )
} }