Don't serialize default primary constructors
Drop "Callable primary_constructor" field, because it requires serializer to serialize the fact that a class has a primary constructor. Default primary constructors for objects etc. may not be serialized, because they can be re-created trivially when they're loaded. There are three options: a class doesn't have a primary constructor, a class has a default primary constructor, a class has a custom primary constructor. This explains the change in descriptors.proto
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
Rニ0B
|
j
|
||||||
|
ニ0B
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,9 @@
|
|||||||
&2
|
&2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
Z
|
|
||||||
0B
|
0B
|
||||||
Z
|
Z
|
||||||
&0B
|
&0B
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,9 @@
|
|||||||
&2
|
&2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
Z
|
|
||||||
0B
|
0B
|
||||||
Z
|
Z
|
||||||
&0?B
|
&0?B
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,9 @@
|
|||||||
&!2
|
&!2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
!Z
|
|
||||||
0B
|
0B
|
||||||
Z
|
Z
|
||||||
&0LB
|
&0LB
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
!
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,9 @@
|
|||||||
&*2
|
&*2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
*Z
|
|
||||||
0B
|
0B
|
||||||
Z
|
Z
|
||||||
&0]B
|
&0]B
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
*
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,8 @@
|
|||||||
&F2
|
&F2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
FZ
|
|
||||||
0B
|
0B
|
||||||
Z&0ŞB
|
Z&0ŞB
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
F
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,5 @@
|
|||||||
†_2
|
†_2
|
||||||
-
|
-
|
||||||
_HRÂ0B
|
_H`Ä`Åj
|
||||||
_`Ä`Å
|
Â0B
|
||||||
|
_
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,8 @@
|
|||||||
&d2
|
&d2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
dZ
|
|
||||||
0B
|
0B
|
||||||
Z&0ĐB
|
Z&0ĐB
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
d
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,8 @@
|
|||||||
&Ż2
|
&Ż2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
ŻZ
|
|
||||||
0B
|
0B
|
||||||
Z&0§B
|
Z&0§B
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
Ż
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,3 @@
|
|||||||
ЅRВ0B
|
Ѕj
|
||||||
|
В0B
|
||||||
Ѕ
|
Ѕ
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
&
|
&
|
||||||
2
|
2
|
||||||
(RĆ0B
|
|
||||||
(Z
|
(Z
|
||||||
&06B
|
&06B
|
||||||
Z
|
Z
|
||||||
@@ -14,4 +13,6 @@
|
|||||||
Z
|
Z
|
||||||
&0;B
|
&0;B
|
||||||
Z
|
Z
|
||||||
Z
|
&0<B
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,8 @@
|
|||||||
&Á2
|
&Á2
|
||||||
|
|
||||||
RĆ0B
|
Z
|
||||||
ÁZ
|
|
||||||
0B
|
0B
|
||||||
Z&0ĐB
|
Z&0ĐB
|
||||||
|
j
|
||||||
|
Ć0B
|
||||||
|
Á
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,9 @@
|
|||||||
Ä2
|
Ä2
|
||||||
R+Ć0:
|
Z0×B
|
||||||
Ő
|
|
||||||
%:Ö
|
|
||||||
ÄB
|
|
||||||
ÄZ
|
ÄZ
|
||||||
0ŘB
|
0ŘB
|
||||||
0ŘB
|
%Z0ŮB
|
||||||
|
j-
|
||||||
|
+Ć0:
|
||||||
|
Ő
|
||||||
|
%:Ö
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
2
|
2
|
||||||
HRВ0B
|
Hj
|
||||||
|
В0B
|
||||||
|
|
||||||
Binary file not shown.
@@ -1,3 +1,4 @@
|
|||||||
��2
|
��2
|
||||||
R�0B
|
j
|
||||||
|
�0B
|
||||||
�
|
�
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
†Η2
|
†Η2
|
||||||
RΖ0B
|
j
|
||||||
|
Ζ0B
|
||||||
Η
|
Η
|
||||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
†É2
|
†É2
|
||||||
RÆ0:à
|
ZÆ 0àB
|
||||||
|
_j
|
||||||
|
Æ0:à
|
||||||
_B
|
_B
|
||||||
ÉZÆ 0àB
|
É
|
||||||
_
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
��2
|
��2
|
||||||
R�0B
|
j
|
||||||
|
�0B
|
||||||
�
|
�
|
||||||
Binary file not shown.
@@ -1,3 +1,4 @@
|
|||||||
��2
|
��2
|
||||||
R�0B
|
j
|
||||||
|
�0B
|
||||||
�
|
�
|
||||||
@@ -120,12 +120,19 @@ message Class {
|
|||||||
|
|
||||||
optional bool class_object_present = 9 [default = false];
|
optional bool class_object_present = 9 [default = false];
|
||||||
|
|
||||||
optional Callable primary_constructor = 10;
|
|
||||||
// todo: other constructors?
|
|
||||||
|
|
||||||
repeated Callable member = 11;
|
repeated Callable member = 11;
|
||||||
|
|
||||||
repeated int32 enum_entry = 12;
|
repeated int32 enum_entry = 12;
|
||||||
|
|
||||||
|
message PrimaryConstructor {
|
||||||
|
// If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
// Otherwise it's default and can be created manually upon deserialization
|
||||||
|
optional Callable data = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This field is present if and only if the class has a primary constructor
|
||||||
|
optional PrimaryConstructor primary_constructor = 13;
|
||||||
|
// todo: other constructors?
|
||||||
}
|
}
|
||||||
|
|
||||||
message Package {
|
message Package {
|
||||||
|
|||||||
+10
-1
@@ -19,6 +19,7 @@ package org.jetbrains.jet.descriptors.serialization;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.descriptors.*;
|
import org.jetbrains.jet.lang.descriptors.*;
|
||||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotated;
|
import org.jetbrains.jet.lang.descriptors.annotations.Annotated;
|
||||||
|
import org.jetbrains.jet.lang.resolve.DescriptorFactory;
|
||||||
import org.jetbrains.jet.lang.types.JetType;
|
import org.jetbrains.jet.lang.types.JetType;
|
||||||
import org.jetbrains.jet.lang.types.TypeConstructor;
|
import org.jetbrains.jet.lang.types.TypeConstructor;
|
||||||
import org.jetbrains.jet.lang.types.TypeProjection;
|
import org.jetbrains.jet.lang.types.TypeProjection;
|
||||||
@@ -101,8 +102,16 @@ public class DescriptorSerializer {
|
|||||||
|
|
||||||
ConstructorDescriptor primaryConstructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
|
ConstructorDescriptor primaryConstructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
|
||||||
if (primaryConstructor != null) {
|
if (primaryConstructor != null) {
|
||||||
builder.setPrimaryConstructor(local.callableProto(primaryConstructor));
|
if (DescriptorFactory.isDefaultPrimaryConstructor(primaryConstructor)) {
|
||||||
|
builder.setPrimaryConstructor(ProtoBuf.Class.PrimaryConstructor.getDefaultInstance());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ProtoBuf.Class.PrimaryConstructor.Builder constructorBuilder = ProtoBuf.Class.PrimaryConstructor.newBuilder();
|
||||||
|
constructorBuilder.setData(local.callableProto(primaryConstructor));
|
||||||
|
builder.setPrimaryConstructor(constructorBuilder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: other constructors
|
// TODO: other constructors
|
||||||
|
|
||||||
for (DeclarationDescriptor descriptor : sort(classDescriptor.getDefaultType().getMemberScope().getAllDescriptors())) {
|
for (DeclarationDescriptor descriptor : sort(classDescriptor.getDefaultType().getMemberScope().getAllDescriptors())) {
|
||||||
|
|||||||
+620
-189
@@ -4437,24 +4437,6 @@ public final class ProtoBuf {
|
|||||||
*/
|
*/
|
||||||
boolean getClassObjectPresent();
|
boolean getClassObjectPresent();
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
boolean hasPrimaryConstructor();
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor();
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;</code>
|
||||||
@@ -4483,6 +4465,24 @@ public final class ProtoBuf {
|
|||||||
* <code>repeated int32 enum_entry = 12;</code>
|
* <code>repeated int32 enum_entry = 12;</code>
|
||||||
*/
|
*/
|
||||||
int getEnumEntry(int index);
|
int getEnumEntry(int index);
|
||||||
|
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
boolean hasPrimaryConstructor();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class}
|
* Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class}
|
||||||
@@ -4605,31 +4605,18 @@ public final class ProtoBuf {
|
|||||||
classObjectPresent_ = input.readBool();
|
classObjectPresent_ = input.readBool();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 82: {
|
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder subBuilder = null;
|
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
subBuilder = primaryConstructor_.toBuilder();
|
|
||||||
}
|
|
||||||
primaryConstructor_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry);
|
|
||||||
if (subBuilder != null) {
|
|
||||||
subBuilder.mergeFrom(primaryConstructor_);
|
|
||||||
primaryConstructor_ = subBuilder.buildPartial();
|
|
||||||
}
|
|
||||||
bitField0_ |= 0x00000010;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 90: {
|
case 90: {
|
||||||
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
|
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
|
||||||
member_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable>();
|
member_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable>();
|
||||||
mutable_bitField0_ |= 0x00000200;
|
mutable_bitField0_ |= 0x00000100;
|
||||||
}
|
}
|
||||||
member_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry));
|
member_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 96: {
|
case 96: {
|
||||||
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
|
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
|
||||||
enumEntry_ = new java.util.ArrayList<java.lang.Integer>();
|
enumEntry_ = new java.util.ArrayList<java.lang.Integer>();
|
||||||
mutable_bitField0_ |= 0x00000400;
|
mutable_bitField0_ |= 0x00000200;
|
||||||
}
|
}
|
||||||
enumEntry_.add(input.readInt32());
|
enumEntry_.add(input.readInt32());
|
||||||
break;
|
break;
|
||||||
@@ -4637,9 +4624,9 @@ public final class ProtoBuf {
|
|||||||
case 98: {
|
case 98: {
|
||||||
int length = input.readRawVarint32();
|
int length = input.readRawVarint32();
|
||||||
int limit = input.pushLimit(length);
|
int limit = input.pushLimit(length);
|
||||||
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) {
|
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) {
|
||||||
enumEntry_ = new java.util.ArrayList<java.lang.Integer>();
|
enumEntry_ = new java.util.ArrayList<java.lang.Integer>();
|
||||||
mutable_bitField0_ |= 0x00000400;
|
mutable_bitField0_ |= 0x00000200;
|
||||||
}
|
}
|
||||||
while (input.getBytesUntilLimit() > 0) {
|
while (input.getBytesUntilLimit() > 0) {
|
||||||
enumEntry_.add(input.readInt32());
|
enumEntry_.add(input.readInt32());
|
||||||
@@ -4647,6 +4634,19 @@ public final class ProtoBuf {
|
|||||||
input.popLimit(limit);
|
input.popLimit(limit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 106: {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.Builder subBuilder = null;
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
subBuilder = primaryConstructor_.toBuilder();
|
||||||
|
}
|
||||||
|
primaryConstructor_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom(primaryConstructor_);
|
||||||
|
primaryConstructor_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -4667,10 +4667,10 @@ public final class ProtoBuf {
|
|||||||
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
|
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
|
||||||
nestedObjectName_ = java.util.Collections.unmodifiableList(nestedObjectName_);
|
nestedObjectName_ = java.util.Collections.unmodifiableList(nestedObjectName_);
|
||||||
}
|
}
|
||||||
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
|
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
|
||||||
member_ = java.util.Collections.unmodifiableList(member_);
|
member_ = java.util.Collections.unmodifiableList(member_);
|
||||||
}
|
}
|
||||||
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
|
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
|
||||||
enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_);
|
enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_);
|
||||||
}
|
}
|
||||||
makeExtensionsImmutable();
|
makeExtensionsImmutable();
|
||||||
@@ -4800,6 +4800,437 @@ public final class ProtoBuf {
|
|||||||
// @@protoc_insertion_point(enum_scope:org.jetbrains.jet.descriptors.serialization.Class.Kind)
|
// @@protoc_insertion_point(enum_scope:org.jetbrains.jet.descriptors.serialization.Class.Kind)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface PrimaryConstructorOrBuilder
|
||||||
|
extends com.google.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
boolean hasData();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor}
|
||||||
|
*/
|
||||||
|
public static final class PrimaryConstructor extends
|
||||||
|
com.google.protobuf.GeneratedMessageLite
|
||||||
|
implements PrimaryConstructorOrBuilder {
|
||||||
|
// Use PrimaryConstructor.newBuilder() to construct.
|
||||||
|
private PrimaryConstructor(com.google.protobuf.GeneratedMessageLite.Builder builder) {
|
||||||
|
super(builder);
|
||||||
|
|
||||||
|
}
|
||||||
|
private PrimaryConstructor(boolean noInit) {}
|
||||||
|
|
||||||
|
private static final PrimaryConstructor defaultInstance;
|
||||||
|
public static PrimaryConstructor getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PrimaryConstructor getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PrimaryConstructor(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
initFields();
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(input,
|
||||||
|
extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10: {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder subBuilder = null;
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
subBuilder = data_.toBuilder();
|
||||||
|
}
|
||||||
|
data_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom(data_);
|
||||||
|
data_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
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 {
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static com.google.protobuf.Parser<PrimaryConstructor> PARSER =
|
||||||
|
new com.google.protobuf.AbstractParser<PrimaryConstructor>() {
|
||||||
|
public PrimaryConstructor parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new PrimaryConstructor(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<PrimaryConstructor> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;
|
||||||
|
public static final int DATA_FIELD_NUMBER = 1;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable data_;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasData() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData() {
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
||||||
|
}
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized != -1) return isInitialized == 1;
|
||||||
|
|
||||||
|
if (hasData()) {
|
||||||
|
if (!getData().isInitialized()) {
|
||||||
|
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.writeMessage(1, data_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
.computeMessageSize(1, data_);
|
||||||
|
}
|
||||||
|
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.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor 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.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseDelimitedFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor 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.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor, Builder>
|
||||||
|
implements org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructorOrBuilder {
|
||||||
|
// Construct using org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
}
|
||||||
|
private static Builder create() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(buildPartial());
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getDefaultInstanceForType() {
|
||||||
|
return org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor build() {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor buildPartial() {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor result = new org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.data_ = data_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor other) {
|
||||||
|
if (other == org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance()) return this;
|
||||||
|
if (other.hasData()) {
|
||||||
|
mergeData(other.getData());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (hasData()) {
|
||||||
|
if (!getData().isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor) e.getUnfinishedMessage();
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasData() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData() {
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setData(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
data_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setData(
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder builderForValue) {
|
||||||
|
data_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder mergeData(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) {
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001) &&
|
||||||
|
data_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance()) {
|
||||||
|
data_ =
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.newBuilder(data_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
data_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* If this field is present, it contains serialized data for the primary constructor.
|
||||||
|
* Otherwise it's default and can be created manually upon deserialization
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder clearData() {
|
||||||
|
data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new PrimaryConstructor(true);
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor)
|
||||||
|
}
|
||||||
|
|
||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
// optional int32 flags = 1 [default = 0];
|
// optional int32 flags = 1 [default = 0];
|
||||||
public static final int FLAGS_FIELD_NUMBER = 1;
|
public static final int FLAGS_FIELD_NUMBER = 1;
|
||||||
@@ -5055,30 +5486,6 @@ public final class ProtoBuf {
|
|||||||
return classObjectPresent_;
|
return classObjectPresent_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;
|
|
||||||
public static final int PRIMARY_CONSTRUCTOR_FIELD_NUMBER = 10;
|
|
||||||
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable primaryConstructor_;
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasPrimaryConstructor() {
|
|
||||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor() {
|
|
||||||
return primaryConstructor_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
||||||
public static final int MEMBER_FIELD_NUMBER = 11;
|
public static final int MEMBER_FIELD_NUMBER = 11;
|
||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable> member_;
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable> member_;
|
||||||
@@ -5138,6 +5545,30 @@ public final class ProtoBuf {
|
|||||||
return enumEntry_.get(index);
|
return enumEntry_.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;
|
||||||
|
public static final int PRIMARY_CONSTRUCTOR_FIELD_NUMBER = 13;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor primaryConstructor_;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasPrimaryConstructor() {
|
||||||
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor() {
|
||||||
|
return primaryConstructor_;
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
flags_ = 0;
|
flags_ = 0;
|
||||||
extraVisibility_ = "";
|
extraVisibility_ = "";
|
||||||
@@ -5147,9 +5578,9 @@ public final class ProtoBuf {
|
|||||||
nestedClassName_ = java.util.Collections.emptyList();
|
nestedClassName_ = java.util.Collections.emptyList();
|
||||||
nestedObjectName_ = java.util.Collections.emptyList();
|
nestedObjectName_ = java.util.Collections.emptyList();
|
||||||
classObjectPresent_ = false;
|
classObjectPresent_ = false;
|
||||||
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
|
||||||
member_ = java.util.Collections.emptyList();
|
member_ = java.util.Collections.emptyList();
|
||||||
enumEntry_ = java.util.Collections.emptyList();
|
enumEntry_ = java.util.Collections.emptyList();
|
||||||
|
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance();
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -5172,14 +5603,14 @@ public final class ProtoBuf {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasPrimaryConstructor()) {
|
for (int i = 0; i < getMemberCount(); i++) {
|
||||||
if (!getPrimaryConstructor().isInitialized()) {
|
if (!getMember(i).isInitialized()) {
|
||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < getMemberCount(); i++) {
|
if (hasPrimaryConstructor()) {
|
||||||
if (!getMember(i).isInitialized()) {
|
if (!getPrimaryConstructor().isInitialized()) {
|
||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -5215,15 +5646,15 @@ public final class ProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
output.writeBool(9, classObjectPresent_);
|
output.writeBool(9, classObjectPresent_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
output.writeMessage(10, primaryConstructor_);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < member_.size(); i++) {
|
for (int i = 0; i < member_.size(); i++) {
|
||||||
output.writeMessage(11, member_.get(i));
|
output.writeMessage(11, member_.get(i));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < enumEntry_.size(); i++) {
|
for (int i = 0; i < enumEntry_.size(); i++) {
|
||||||
output.writeInt32(12, enumEntry_.get(i));
|
output.writeInt32(12, enumEntry_.get(i));
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
output.writeMessage(13, primaryConstructor_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int memoizedSerializedSize = -1;
|
private int memoizedSerializedSize = -1;
|
||||||
@@ -5274,10 +5705,6 @@ public final class ProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeBoolSize(9, classObjectPresent_);
|
.computeBoolSize(9, classObjectPresent_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
size += com.google.protobuf.CodedOutputStream
|
|
||||||
.computeMessageSize(10, primaryConstructor_);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < member_.size(); i++) {
|
for (int i = 0; i < member_.size(); i++) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(11, member_.get(i));
|
.computeMessageSize(11, member_.get(i));
|
||||||
@@ -5291,6 +5718,10 @@ public final class ProtoBuf {
|
|||||||
size += dataSize;
|
size += dataSize;
|
||||||
size += 1 * getEnumEntryList().size();
|
size += 1 * getEnumEntryList().size();
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(13, primaryConstructor_);
|
||||||
|
}
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
@@ -5398,11 +5829,11 @@ public final class ProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000040);
|
bitField0_ = (bitField0_ & ~0x00000040);
|
||||||
classObjectPresent_ = false;
|
classObjectPresent_ = false;
|
||||||
bitField0_ = (bitField0_ & ~0x00000080);
|
bitField0_ = (bitField0_ & ~0x00000080);
|
||||||
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
|
||||||
member_ = java.util.Collections.emptyList();
|
member_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
enumEntry_ = java.util.Collections.emptyList();
|
enumEntry_ = java.util.Collections.emptyList();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000200);
|
||||||
|
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000400);
|
bitField0_ = (bitField0_ & ~0x00000400);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -5463,20 +5894,20 @@ public final class ProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000008;
|
to_bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
result.classObjectPresent_ = classObjectPresent_;
|
result.classObjectPresent_ = classObjectPresent_;
|
||||||
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
|
if (((bitField0_ & 0x00000100) == 0x00000100)) {
|
||||||
|
member_ = java.util.Collections.unmodifiableList(member_);
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
|
}
|
||||||
|
result.member_ = member_;
|
||||||
|
if (((bitField0_ & 0x00000200) == 0x00000200)) {
|
||||||
|
enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_);
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000200);
|
||||||
|
}
|
||||||
|
result.enumEntry_ = enumEntry_;
|
||||||
|
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
|
||||||
to_bitField0_ |= 0x00000010;
|
to_bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
result.primaryConstructor_ = primaryConstructor_;
|
result.primaryConstructor_ = primaryConstructor_;
|
||||||
if (((bitField0_ & 0x00000200) == 0x00000200)) {
|
|
||||||
member_ = java.util.Collections.unmodifiableList(member_);
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
|
||||||
}
|
|
||||||
result.member_ = member_;
|
|
||||||
if (((bitField0_ & 0x00000400) == 0x00000400)) {
|
|
||||||
enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_);
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000400);
|
|
||||||
}
|
|
||||||
result.enumEntry_ = enumEntry_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -5537,13 +5968,10 @@ public final class ProtoBuf {
|
|||||||
if (other.hasClassObjectPresent()) {
|
if (other.hasClassObjectPresent()) {
|
||||||
setClassObjectPresent(other.getClassObjectPresent());
|
setClassObjectPresent(other.getClassObjectPresent());
|
||||||
}
|
}
|
||||||
if (other.hasPrimaryConstructor()) {
|
|
||||||
mergePrimaryConstructor(other.getPrimaryConstructor());
|
|
||||||
}
|
|
||||||
if (!other.member_.isEmpty()) {
|
if (!other.member_.isEmpty()) {
|
||||||
if (member_.isEmpty()) {
|
if (member_.isEmpty()) {
|
||||||
member_ = other.member_;
|
member_ = other.member_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
} else {
|
} else {
|
||||||
ensureMemberIsMutable();
|
ensureMemberIsMutable();
|
||||||
member_.addAll(other.member_);
|
member_.addAll(other.member_);
|
||||||
@@ -5553,13 +5981,16 @@ public final class ProtoBuf {
|
|||||||
if (!other.enumEntry_.isEmpty()) {
|
if (!other.enumEntry_.isEmpty()) {
|
||||||
if (enumEntry_.isEmpty()) {
|
if (enumEntry_.isEmpty()) {
|
||||||
enumEntry_ = other.enumEntry_;
|
enumEntry_ = other.enumEntry_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000400);
|
bitField0_ = (bitField0_ & ~0x00000200);
|
||||||
} else {
|
} else {
|
||||||
ensureEnumEntryIsMutable();
|
ensureEnumEntryIsMutable();
|
||||||
enumEntry_.addAll(other.enumEntry_);
|
enumEntry_.addAll(other.enumEntry_);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (other.hasPrimaryConstructor()) {
|
||||||
|
mergePrimaryConstructor(other.getPrimaryConstructor());
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5580,14 +6011,14 @@ public final class ProtoBuf {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasPrimaryConstructor()) {
|
for (int i = 0; i < getMemberCount(); i++) {
|
||||||
if (!getPrimaryConstructor().isInitialized()) {
|
if (!getMember(i).isInitialized()) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < getMemberCount(); i++) {
|
if (hasPrimaryConstructor()) {
|
||||||
if (!getMember(i).isInitialized()) {
|
if (!getPrimaryConstructor().isInitialized()) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -6264,98 +6695,13 @@ public final class ProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;
|
|
||||||
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasPrimaryConstructor() {
|
|
||||||
return ((bitField0_ & 0x00000100) == 0x00000100);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor() {
|
|
||||||
return primaryConstructor_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder setPrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) {
|
|
||||||
if (value == null) {
|
|
||||||
throw new NullPointerException();
|
|
||||||
}
|
|
||||||
primaryConstructor_ = value;
|
|
||||||
|
|
||||||
bitField0_ |= 0x00000100;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder setPrimaryConstructor(
|
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder builderForValue) {
|
|
||||||
primaryConstructor_ = builderForValue.build();
|
|
||||||
|
|
||||||
bitField0_ |= 0x00000100;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder mergePrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) {
|
|
||||||
if (((bitField0_ & 0x00000100) == 0x00000100) &&
|
|
||||||
primaryConstructor_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance()) {
|
|
||||||
primaryConstructor_ =
|
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.newBuilder(primaryConstructor_).mergeFrom(value).buildPartial();
|
|
||||||
} else {
|
|
||||||
primaryConstructor_ = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bitField0_ |= 0x00000100;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10;</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* todo: other constructors?
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder clearPrimaryConstructor() {
|
|
||||||
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance();
|
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
// repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11;
|
||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable> member_ =
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable> member_ =
|
||||||
java.util.Collections.emptyList();
|
java.util.Collections.emptyList();
|
||||||
private void ensureMemberIsMutable() {
|
private void ensureMemberIsMutable() {
|
||||||
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
|
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
|
||||||
member_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable>(member_);
|
member_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable>(member_);
|
||||||
bitField0_ |= 0x00000200;
|
bitField0_ |= 0x00000100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6460,7 +6806,7 @@ public final class ProtoBuf {
|
|||||||
*/
|
*/
|
||||||
public Builder clearMember() {
|
public Builder clearMember() {
|
||||||
member_ = java.util.Collections.emptyList();
|
member_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -6477,9 +6823,9 @@ public final class ProtoBuf {
|
|||||||
// repeated int32 enum_entry = 12;
|
// repeated int32 enum_entry = 12;
|
||||||
private java.util.List<java.lang.Integer> enumEntry_ = java.util.Collections.emptyList();
|
private java.util.List<java.lang.Integer> enumEntry_ = java.util.Collections.emptyList();
|
||||||
private void ensureEnumEntryIsMutable() {
|
private void ensureEnumEntryIsMutable() {
|
||||||
if (!((bitField0_ & 0x00000400) == 0x00000400)) {
|
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
|
||||||
enumEntry_ = new java.util.ArrayList<java.lang.Integer>(enumEntry_);
|
enumEntry_ = new java.util.ArrayList<java.lang.Integer>(enumEntry_);
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -6535,11 +6881,96 @@ public final class ProtoBuf {
|
|||||||
*/
|
*/
|
||||||
public Builder clearEnumEntry() {
|
public Builder clearEnumEntry() {
|
||||||
enumEntry_ = java.util.Collections.emptyList();
|
enumEntry_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000400);
|
bitField0_ = (bitField0_ & ~0x00000200);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public boolean hasPrimaryConstructor() {
|
||||||
|
return ((bitField0_ & 0x00000400) == 0x00000400);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor() {
|
||||||
|
return primaryConstructor_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setPrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
primaryConstructor_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setPrimaryConstructor(
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.Builder builderForValue) {
|
||||||
|
primaryConstructor_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder mergePrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor value) {
|
||||||
|
if (((bitField0_ & 0x00000400) == 0x00000400) &&
|
||||||
|
primaryConstructor_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance()) {
|
||||||
|
primaryConstructor_ =
|
||||||
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.newBuilder(primaryConstructor_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
primaryConstructor_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* This field is present if and only if the class has a primary constructor
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder clearPrimaryConstructor() {
|
||||||
|
primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000400);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.Class)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.Class)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-2
@@ -209,8 +209,14 @@ public class DeserializedClassDescriptor extends AbstractClassDescriptor impleme
|
|||||||
private ConstructorDescriptor computePrimaryConstructor() {
|
private ConstructorDescriptor computePrimaryConstructor() {
|
||||||
if (!classProto.hasPrimaryConstructor()) return null;
|
if (!classProto.hasPrimaryConstructor()) return null;
|
||||||
|
|
||||||
ProtoBuf.Callable constructorProto = classProto.getPrimaryConstructor();
|
ProtoBuf.Class.PrimaryConstructor constructorProto = classProto.getPrimaryConstructor();
|
||||||
return (ConstructorDescriptor) deserializer.loadCallable(constructorProto);
|
if (!constructorProto.hasData()) {
|
||||||
|
ConstructorDescriptorImpl descriptor = DescriptorFactory.createPrimaryConstructorForObject(this);
|
||||||
|
descriptor.setReturnType(getDefaultType());
|
||||||
|
return descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (ConstructorDescriptor) deserializer.loadCallable(constructorProto.getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ public class DescriptorFactory {
|
|||||||
public static final Name VALUE_OF_METHOD_NAME = Name.identifier("valueOf");
|
public static final Name VALUE_OF_METHOD_NAME = Name.identifier("valueOf");
|
||||||
public static final Name VALUES_METHOD_NAME = Name.identifier("values");
|
public static final Name VALUES_METHOD_NAME = Name.identifier("values");
|
||||||
|
|
||||||
|
private static class DefaultConstructorDescriptor extends ConstructorDescriptorImpl {
|
||||||
|
public DefaultConstructorDescriptor(@NotNull ClassDescriptor containingClass) {
|
||||||
|
super(containingClass, Collections.<AnnotationDescriptor>emptyList(), true);
|
||||||
|
initialize(Collections.<TypeParameterDescriptor>emptyList(), Collections.<ValueParameterDescriptor>emptyList(),
|
||||||
|
getDefaultConstructorVisibility(containingClass));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private DescriptorFactory() {
|
private DescriptorFactory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,12 +76,11 @@ public class DescriptorFactory {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static ConstructorDescriptorImpl createPrimaryConstructorForObject(@NotNull ClassDescriptor containingClass) {
|
public static ConstructorDescriptorImpl createPrimaryConstructorForObject(@NotNull ClassDescriptor containingClass) {
|
||||||
ConstructorDescriptorImpl constructorDescriptor =
|
return new DefaultConstructorDescriptor(containingClass);
|
||||||
new ConstructorDescriptorImpl(containingClass, Collections.<AnnotationDescriptor>emptyList(), true);
|
}
|
||||||
constructorDescriptor.initialize(Collections.<TypeParameterDescriptor>emptyList(),
|
|
||||||
Collections.<ValueParameterDescriptor>emptyList(),
|
public static boolean isDefaultPrimaryConstructor(@NotNull ConstructorDescriptor constructor) {
|
||||||
getDefaultConstructorVisibility(containingClass));
|
return constructor instanceof DefaultConstructorDescriptor;
|
||||||
return constructorDescriptor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user