Rename in descriptors.proto: class_object_name -> default_object_name

This commit is contained in:
Pavel V. Talanov
2015-03-03 18:47:55 +03:00
parent 48fbce9582
commit f507af15c0
8 changed files with 130 additions and 131 deletions
@@ -1379,7 +1379,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1388,7 +1388,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1526,7 +1526,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1537,7 +1537,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1880,7 +1880,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1891,7 +1891,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1902,7 +1902,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
@@ -1916,7 +1916,7 @@ public final class JvmProtoBuf {
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a class object and is really present as a static
* True iff this field is a backing field for a default object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
+1 -1
View File
@@ -180,7 +180,7 @@ message Class {
required int32 fq_name = 3;
// If this field is present, it contains the name of default object.
optional int32 class_object_name = 4;
optional int32 default_object_name = 4;
repeated TypeParameter type_parameter = 5;
repeated Type supertype = 6;
@@ -32,7 +32,6 @@ import java.util.Collections;
import java.util.List;
import static org.jetbrains.kotlin.resolve.DescriptorUtils.isEnumEntry;
import static org.jetbrains.kotlin.resolve.DescriptorUtils.isObject;
public class DescriptorSerializer {
@@ -133,7 +132,7 @@ public class DescriptorSerializer {
ClassDescriptor defaultObjectDescriptor = classDescriptor.getDefaultObjectDescriptor();
if (defaultObjectDescriptor != null) {
builder.setClassObjectName(stringTable.getSimpleNameIndex(defaultObjectDescriptor.getName()));
builder.setDefaultObjectName(stringTable.getSimpleNameIndex(defaultObjectDescriptor.getName()));
}
extension.serializeClass(classDescriptor, builder, stringTable);
@@ -7310,23 +7310,23 @@ public final class ProtoBuf {
*/
int getFqName();
// optional int32 class_object_name = 4;
// optional int32 default_object_name = 4;
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
boolean hasClassObjectName();
boolean hasDefaultObjectName();
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
int getClassObjectName();
int getDefaultObjectName();
// repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 5;
/**
@@ -7489,7 +7489,7 @@ public final class ProtoBuf {
}
case 32: {
bitField0_ |= 0x00000004;
classObjectName_ = input.readInt32();
defaultObjectName_ = input.readInt32();
break;
}
case 42: {
@@ -8203,28 +8203,28 @@ public final class ProtoBuf {
return fqName_;
}
// optional int32 class_object_name = 4;
public static final int CLASS_OBJECT_NAME_FIELD_NUMBER = 4;
private int classObjectName_;
// optional int32 default_object_name = 4;
public static final int DEFAULT_OBJECT_NAME_FIELD_NUMBER = 4;
private int defaultObjectName_;
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public boolean hasClassObjectName() {
public boolean hasDefaultObjectName() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public int getClassObjectName() {
return classObjectName_;
public int getDefaultObjectName() {
return defaultObjectName_;
}
// repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 5;
@@ -8423,7 +8423,7 @@ public final class ProtoBuf {
private void initFields() {
flags_ = 0;
fqName_ = 0;
classObjectName_ = 0;
defaultObjectName_ = 0;
typeParameter_ = java.util.Collections.emptyList();
supertype_ = java.util.Collections.emptyList();
nestedClassName_ = java.util.Collections.emptyList();
@@ -8485,7 +8485,7 @@ public final class ProtoBuf {
output.writeInt32(3, fqName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(4, classObjectName_);
output.writeInt32(4, defaultObjectName_);
}
for (int i = 0; i < typeParameter_.size(); i++) {
output.writeMessage(5, typeParameter_.get(i));
@@ -8524,7 +8524,7 @@ public final class ProtoBuf {
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, classObjectName_);
.computeInt32Size(4, defaultObjectName_);
}
for (int i = 0; i < typeParameter_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
@@ -8655,7 +8655,7 @@ public final class ProtoBuf {
bitField0_ = (bitField0_ & ~0x00000001);
fqName_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
classObjectName_ = 0;
defaultObjectName_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
typeParameter_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
@@ -8703,7 +8703,7 @@ public final class ProtoBuf {
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.classObjectName_ = classObjectName_;
result.defaultObjectName_ = defaultObjectName_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_);
bitField0_ = (bitField0_ & ~0x00000008);
@@ -8745,8 +8745,8 @@ public final class ProtoBuf {
if (other.hasFqName()) {
setFqName(other.getFqName());
}
if (other.hasClassObjectName()) {
setClassObjectName(other.getClassObjectName());
if (other.hasDefaultObjectName()) {
setDefaultObjectName(other.getDefaultObjectName());
}
if (!other.typeParameter_.isEmpty()) {
if (typeParameter_.isEmpty()) {
@@ -8962,51 +8962,51 @@ public final class ProtoBuf {
return this;
}
// optional int32 class_object_name = 4;
private int classObjectName_ ;
// optional int32 default_object_name = 4;
private int defaultObjectName_ ;
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public boolean hasClassObjectName() {
public boolean hasDefaultObjectName() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public int getClassObjectName() {
return classObjectName_;
public int getDefaultObjectName() {
return defaultObjectName_;
}
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public Builder setClassObjectName(int value) {
public Builder setDefaultObjectName(int value) {
bitField0_ |= 0x00000004;
classObjectName_ = value;
defaultObjectName_ = value;
return this;
}
/**
* <code>optional int32 class_object_name = 4;</code>
* <code>optional int32 default_object_name = 4;</code>
*
* <pre>
* If this field is present, it contains the name of default object.
* </pre>
*/
public Builder clearClassObjectName() {
public Builder clearDefaultObjectName() {
bitField0_ = (bitField0_ & ~0x00000004);
classObjectName_ = 0;
defaultObjectName_ = 0;
return this;
}
@@ -110,9 +110,9 @@ public class DeserializedClassDescriptor(
}
private fun computeDefaultObjectDescriptor(): ClassDescriptor? {
if (!classProto.hasClassObjectName()) return null
if (!classProto.hasDefaultObjectName()) return null
val defaultObjectName = c.nameResolver.getName(classProto.getClassObjectName())
val defaultObjectName = c.nameResolver.getName(classProto.getDefaultObjectName())
return memberScope.getClassifier(defaultObjectName) as? ClassDescriptor
}