Extract field signature out of Java property signature
This commit is contained in:
@@ -48,15 +48,21 @@ message JavaMethodSignature {
|
|||||||
repeated JavaType parameter_type = 3;
|
repeated JavaType parameter_type = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message JavaFieldSignature {
|
||||||
|
required int32 name = 1;
|
||||||
|
required JavaType type = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message JavaPropertySignature {
|
message JavaPropertySignature {
|
||||||
required JavaType type = 1;
|
// A property itself is identified either by the field, or by the name of the synthetic method.
|
||||||
|
// If the property is annotated, then either field or synthetic_method_name should be present
|
||||||
|
optional JavaFieldSignature field = 1;
|
||||||
|
|
||||||
// One of these should be present
|
// Name of the synthetic method created to store property annotations. Signature is always "()V"
|
||||||
optional int32 field_name = 2;
|
optional int32 synthetic_method_name = 2;
|
||||||
optional int32 synthetic_method_name = 3; // Name of the synthetic method created to store property annotations
|
|
||||||
|
|
||||||
optional JavaMethodSignature getter = 4;
|
optional JavaMethodSignature getter = 3;
|
||||||
optional JavaMethodSignature setter = 5;
|
optional JavaMethodSignature setter = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Callable {
|
extend Callable {
|
||||||
|
|||||||
+472
-143
@@ -1005,26 +1005,404 @@ public final class JavaProtoBuf {
|
|||||||
// @@protoc_insertion_point(class_scope:org.jetbrains.jet.descriptors.serialization.JavaMethodSignature)
|
// @@protoc_insertion_point(class_scope:org.jetbrains.jet.descriptors.serialization.JavaMethodSignature)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface JavaFieldSignatureOrBuilder
|
||||||
|
extends com.google.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
|
// required int32 name = 1;
|
||||||
|
boolean hasName();
|
||||||
|
int getName();
|
||||||
|
|
||||||
|
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 2;
|
||||||
|
boolean hasType();
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType();
|
||||||
|
}
|
||||||
|
public static final class JavaFieldSignature extends
|
||||||
|
com.google.protobuf.GeneratedMessageLite
|
||||||
|
implements JavaFieldSignatureOrBuilder {
|
||||||
|
// Use JavaFieldSignature.newBuilder() to construct.
|
||||||
|
private JavaFieldSignature(Builder builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private JavaFieldSignature(boolean noInit) {}
|
||||||
|
|
||||||
|
private static final JavaFieldSignature defaultInstance;
|
||||||
|
public static JavaFieldSignature getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavaFieldSignature getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
// required int32 name = 1;
|
||||||
|
public static final int NAME_FIELD_NUMBER = 1;
|
||||||
|
private int name_;
|
||||||
|
public boolean hasName() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
public int getName() {
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 2;
|
||||||
|
public static final int TYPE_FIELD_NUMBER = 2;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType type_;
|
||||||
|
public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType() {
|
||||||
|
return type_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
name_ = 0;
|
||||||
|
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
||||||
|
}
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized != -1) return isInitialized == 1;
|
||||||
|
|
||||||
|
if (!hasName()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasType()) {
|
||||||
|
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.writeInt32(1, name_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
output.writeMessage(2, type_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
.computeInt32Size(1, name_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(2, type_);
|
||||||
|
}
|
||||||
|
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.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
||||||
|
.buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
||||||
|
.buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
||||||
|
.buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
Builder builder = newBuilder();
|
||||||
|
if (builder.mergeDelimitedFrom(input)) {
|
||||||
|
return builder.buildParsed();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
Builder builder = newBuilder();
|
||||||
|
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
|
||||||
|
return builder.buildParsed();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
||||||
|
.buildParsed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Builder newBuilder() { return Builder.create(); }
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature, Builder>
|
||||||
|
implements org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignatureOrBuilder {
|
||||||
|
// Construct using org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
}
|
||||||
|
private static Builder create() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
name_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(buildPartial());
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature getDefaultInstanceForType() {
|
||||||
|
return org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature build() {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature buildParsed()
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(
|
||||||
|
result).asInvalidProtocolBufferException();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature buildPartial() {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature result = new org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.name_ = name_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.type_ = type_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature other) {
|
||||||
|
if (other == org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance()) return this;
|
||||||
|
if (other.hasName()) {
|
||||||
|
setName(other.getName());
|
||||||
|
}
|
||||||
|
if (other.hasType()) {
|
||||||
|
mergeType(other.getType());
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasName()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasType()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
while (true) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
|
||||||
|
return this;
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(input, extensionRegistry, tag)) {
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8: {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
name_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.newBuilder();
|
||||||
|
if (hasType()) {
|
||||||
|
subBuilder.mergeFrom(getType());
|
||||||
|
}
|
||||||
|
input.readMessage(subBuilder, extensionRegistry);
|
||||||
|
setType(subBuilder.buildPartial());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
// required int32 name = 1;
|
||||||
|
private int name_ ;
|
||||||
|
public boolean hasName() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
public int getName() {
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
public Builder setName(int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
name_ = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearName() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
name_ = 0;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 2;
|
||||||
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
||||||
|
public boolean hasType() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType() {
|
||||||
|
return type_;
|
||||||
|
}
|
||||||
|
public Builder setType(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
type_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder setType(
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.Builder builderForValue) {
|
||||||
|
type_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder mergeType(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType value) {
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002) &&
|
||||||
|
type_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance()) {
|
||||||
|
type_ =
|
||||||
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.newBuilder(type_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
type_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearType() {
|
||||||
|
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.JavaFieldSignature)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new JavaFieldSignature(true);
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:org.jetbrains.jet.descriptors.serialization.JavaFieldSignature)
|
||||||
|
}
|
||||||
|
|
||||||
public interface JavaPropertySignatureOrBuilder
|
public interface JavaPropertySignatureOrBuilder
|
||||||
extends com.google.protobuf.MessageLiteOrBuilder {
|
extends com.google.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 1;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaFieldSignature field = 1;
|
||||||
boolean hasType();
|
boolean hasField();
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature getField();
|
||||||
|
|
||||||
// optional int32 field_name = 2;
|
// optional int32 synthetic_method_name = 2;
|
||||||
boolean hasFieldName();
|
|
||||||
int getFieldName();
|
|
||||||
|
|
||||||
// optional int32 synthetic_method_name = 3;
|
|
||||||
boolean hasSyntheticMethodName();
|
boolean hasSyntheticMethodName();
|
||||||
int getSyntheticMethodName();
|
int getSyntheticMethodName();
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 4;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 3;
|
||||||
boolean hasGetter();
|
boolean hasGetter();
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter();
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 5;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 4;
|
||||||
boolean hasSetter();
|
boolean hasSetter();
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter();
|
||||||
}
|
}
|
||||||
@@ -1047,59 +1425,48 @@ public final class JavaProtoBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 1;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaFieldSignature field = 1;
|
||||||
public static final int TYPE_FIELD_NUMBER = 1;
|
public static final int FIELD_FIELD_NUMBER = 1;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType type_;
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature field_;
|
||||||
public boolean hasType() {
|
public boolean hasField() {
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature getField() {
|
||||||
return type_;
|
return field_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional int32 field_name = 2;
|
// optional int32 synthetic_method_name = 2;
|
||||||
public static final int FIELD_NAME_FIELD_NUMBER = 2;
|
public static final int SYNTHETIC_METHOD_NAME_FIELD_NUMBER = 2;
|
||||||
private int fieldName_;
|
|
||||||
public boolean hasFieldName() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
public int getFieldName() {
|
|
||||||
return fieldName_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// optional int32 synthetic_method_name = 3;
|
|
||||||
public static final int SYNTHETIC_METHOD_NAME_FIELD_NUMBER = 3;
|
|
||||||
private int syntheticMethodName_;
|
private int syntheticMethodName_;
|
||||||
public boolean hasSyntheticMethodName() {
|
public boolean hasSyntheticMethodName() {
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
}
|
}
|
||||||
public int getSyntheticMethodName() {
|
public int getSyntheticMethodName() {
|
||||||
return syntheticMethodName_;
|
return syntheticMethodName_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 4;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 3;
|
||||||
public static final int GETTER_FIELD_NUMBER = 4;
|
public static final int GETTER_FIELD_NUMBER = 3;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getter_;
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getter_;
|
||||||
public boolean hasGetter() {
|
public boolean hasGetter() {
|
||||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter() {
|
||||||
return getter_;
|
return getter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 5;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 4;
|
||||||
public static final int SETTER_FIELD_NUMBER = 5;
|
public static final int SETTER_FIELD_NUMBER = 4;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature setter_;
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature setter_;
|
||||||
public boolean hasSetter() {
|
public boolean hasSetter() {
|
||||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter() {
|
||||||
return setter_;
|
return setter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
field_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance();
|
||||||
fieldName_ = 0;
|
|
||||||
syntheticMethodName_ = 0;
|
syntheticMethodName_ = 0;
|
||||||
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
@@ -1109,9 +1476,11 @@ public final class JavaProtoBuf {
|
|||||||
byte isInitialized = memoizedIsInitialized;
|
byte isInitialized = memoizedIsInitialized;
|
||||||
if (isInitialized != -1) return isInitialized == 1;
|
if (isInitialized != -1) return isInitialized == 1;
|
||||||
|
|
||||||
if (!hasType()) {
|
if (hasField()) {
|
||||||
memoizedIsInitialized = 0;
|
if (!getField().isInitialized()) {
|
||||||
return false;
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (hasGetter()) {
|
if (hasGetter()) {
|
||||||
if (!getGetter().isInitialized()) {
|
if (!getGetter().isInitialized()) {
|
||||||
@@ -1133,19 +1502,16 @@ public final class JavaProtoBuf {
|
|||||||
throws java.io.IOException {
|
throws java.io.IOException {
|
||||||
getSerializedSize();
|
getSerializedSize();
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
output.writeMessage(1, type_);
|
output.writeMessage(1, field_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, fieldName_);
|
output.writeInt32(2, syntheticMethodName_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
output.writeInt32(3, syntheticMethodName_);
|
output.writeMessage(3, getter_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
output.writeMessage(4, getter_);
|
output.writeMessage(4, setter_);
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
output.writeMessage(5, setter_);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1157,23 +1523,19 @@ public final class JavaProtoBuf {
|
|||||||
size = 0;
|
size = 0;
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(1, type_);
|
.computeMessageSize(1, field_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, fieldName_);
|
.computeInt32Size(2, syntheticMethodName_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(3, syntheticMethodName_);
|
.computeMessageSize(3, getter_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(4, getter_);
|
.computeMessageSize(4, setter_);
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
size += com.google.protobuf.CodedOutputStream
|
|
||||||
.computeMessageSize(5, setter_);
|
|
||||||
}
|
}
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -1277,16 +1639,14 @@ public final class JavaProtoBuf {
|
|||||||
|
|
||||||
public Builder clear() {
|
public Builder clear() {
|
||||||
super.clear();
|
super.clear();
|
||||||
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
field_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
fieldName_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
syntheticMethodName_ = 0;
|
syntheticMethodName_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1323,22 +1683,18 @@ public final class JavaProtoBuf {
|
|||||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
to_bitField0_ |= 0x00000001;
|
to_bitField0_ |= 0x00000001;
|
||||||
}
|
}
|
||||||
result.type_ = type_;
|
result.field_ = field_;
|
||||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.fieldName_ = fieldName_;
|
result.syntheticMethodName_ = syntheticMethodName_;
|
||||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
to_bitField0_ |= 0x00000004;
|
to_bitField0_ |= 0x00000004;
|
||||||
}
|
}
|
||||||
result.syntheticMethodName_ = syntheticMethodName_;
|
result.getter_ = getter_;
|
||||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
to_bitField0_ |= 0x00000008;
|
to_bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
result.getter_ = getter_;
|
|
||||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
to_bitField0_ |= 0x00000010;
|
|
||||||
}
|
|
||||||
result.setter_ = setter_;
|
result.setter_ = setter_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
@@ -1346,11 +1702,8 @@ public final class JavaProtoBuf {
|
|||||||
|
|
||||||
public Builder mergeFrom(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaPropertySignature other) {
|
public Builder mergeFrom(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaPropertySignature other) {
|
||||||
if (other == org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaPropertySignature.getDefaultInstance()) return this;
|
if (other == org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaPropertySignature.getDefaultInstance()) return this;
|
||||||
if (other.hasType()) {
|
if (other.hasField()) {
|
||||||
mergeType(other.getType());
|
mergeField(other.getField());
|
||||||
}
|
|
||||||
if (other.hasFieldName()) {
|
|
||||||
setFieldName(other.getFieldName());
|
|
||||||
}
|
}
|
||||||
if (other.hasSyntheticMethodName()) {
|
if (other.hasSyntheticMethodName()) {
|
||||||
setSyntheticMethodName(other.getSyntheticMethodName());
|
setSyntheticMethodName(other.getSyntheticMethodName());
|
||||||
@@ -1365,9 +1718,11 @@ public final class JavaProtoBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
if (!hasType()) {
|
if (hasField()) {
|
||||||
|
if (!getField().isInitialized()) {
|
||||||
return false;
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (hasGetter()) {
|
if (hasGetter()) {
|
||||||
if (!getGetter().isInitialized()) {
|
if (!getGetter().isInitialized()) {
|
||||||
@@ -1402,25 +1757,20 @@ public final class JavaProtoBuf {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 10: {
|
case 10: {
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.newBuilder();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.newBuilder();
|
||||||
if (hasType()) {
|
if (hasField()) {
|
||||||
subBuilder.mergeFrom(getType());
|
subBuilder.mergeFrom(getField());
|
||||||
}
|
}
|
||||||
input.readMessage(subBuilder, extensionRegistry);
|
input.readMessage(subBuilder, extensionRegistry);
|
||||||
setType(subBuilder.buildPartial());
|
setField(subBuilder.buildPartial());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 16: {
|
case 16: {
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000002;
|
||||||
fieldName_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 24: {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
syntheticMethodName_ = input.readInt32();
|
syntheticMethodName_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 34: {
|
case 26: {
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder();
|
||||||
if (hasGetter()) {
|
if (hasGetter()) {
|
||||||
subBuilder.mergeFrom(getGetter());
|
subBuilder.mergeFrom(getGetter());
|
||||||
@@ -1429,7 +1779,7 @@ public final class JavaProtoBuf {
|
|||||||
setGetter(subBuilder.buildPartial());
|
setGetter(subBuilder.buildPartial());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 42: {
|
case 34: {
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder subBuilder = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder();
|
||||||
if (hasSetter()) {
|
if (hasSetter()) {
|
||||||
subBuilder.mergeFrom(getSetter());
|
subBuilder.mergeFrom(getSetter());
|
||||||
@@ -1444,95 +1794,74 @@ public final class JavaProtoBuf {
|
|||||||
|
|
||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
|
|
||||||
// required .org.jetbrains.jet.descriptors.serialization.JavaType type = 1;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaFieldSignature field = 1;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature field_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance();
|
||||||
public boolean hasType() {
|
public boolean hasField() {
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType getType() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature getField() {
|
||||||
return type_;
|
return field_;
|
||||||
}
|
}
|
||||||
public Builder setType(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType value) {
|
public Builder setField(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
type_ = value;
|
field_ = value;
|
||||||
|
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000001;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder setType(
|
public Builder setField(
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.Builder builderForValue) {
|
||||||
type_ = builderForValue.build();
|
field_ = builderForValue.build();
|
||||||
|
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000001;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder mergeType(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType value) {
|
public Builder mergeField(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature value) {
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001) &&
|
if (((bitField0_ & 0x00000001) == 0x00000001) &&
|
||||||
type_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance()) {
|
field_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance()) {
|
||||||
type_ =
|
field_ =
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.newBuilder(type_).mergeFrom(value).buildPartial();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.newBuilder(field_).mergeFrom(value).buildPartial();
|
||||||
} else {
|
} else {
|
||||||
type_ = value;
|
field_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000001;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder clearType() {
|
public Builder clearField() {
|
||||||
type_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaType.getDefaultInstance();
|
field_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaFieldSignature.getDefaultInstance();
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional int32 field_name = 2;
|
// optional int32 synthetic_method_name = 2;
|
||||||
private int fieldName_ ;
|
|
||||||
public boolean hasFieldName() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
public int getFieldName() {
|
|
||||||
return fieldName_;
|
|
||||||
}
|
|
||||||
public Builder setFieldName(int value) {
|
|
||||||
bitField0_ |= 0x00000002;
|
|
||||||
fieldName_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
public Builder clearFieldName() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
fieldName_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// optional int32 synthetic_method_name = 3;
|
|
||||||
private int syntheticMethodName_ ;
|
private int syntheticMethodName_ ;
|
||||||
public boolean hasSyntheticMethodName() {
|
public boolean hasSyntheticMethodName() {
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
}
|
}
|
||||||
public int getSyntheticMethodName() {
|
public int getSyntheticMethodName() {
|
||||||
return syntheticMethodName_;
|
return syntheticMethodName_;
|
||||||
}
|
}
|
||||||
public Builder setSyntheticMethodName(int value) {
|
public Builder setSyntheticMethodName(int value) {
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000002;
|
||||||
syntheticMethodName_ = value;
|
syntheticMethodName_ = value;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder clearSyntheticMethodName() {
|
public Builder clearSyntheticMethodName() {
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
syntheticMethodName_ = 0;
|
syntheticMethodName_ = 0;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 4;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature getter = 3;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
public boolean hasGetter() {
|
public boolean hasGetter() {
|
||||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getGetter() {
|
||||||
return getter_;
|
return getter_;
|
||||||
@@ -1543,18 +1872,18 @@ public final class JavaProtoBuf {
|
|||||||
}
|
}
|
||||||
getter_ = value;
|
getter_ = value;
|
||||||
|
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000004;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder setGetter(
|
public Builder setGetter(
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder builderForValue) {
|
||||||
getter_ = builderForValue.build();
|
getter_ = builderForValue.build();
|
||||||
|
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000004;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder mergeGetter(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature value) {
|
public Builder mergeGetter(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature value) {
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008) &&
|
if (((bitField0_ & 0x00000004) == 0x00000004) &&
|
||||||
getter_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance()) {
|
getter_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance()) {
|
||||||
getter_ =
|
getter_ =
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder(getter_).mergeFrom(value).buildPartial();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder(getter_).mergeFrom(value).buildPartial();
|
||||||
@@ -1562,20 +1891,20 @@ public final class JavaProtoBuf {
|
|||||||
getter_ = value;
|
getter_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000004;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder clearGetter() {
|
public Builder clearGetter() {
|
||||||
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
getter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 5;
|
// optional .org.jetbrains.jet.descriptors.serialization.JavaMethodSignature setter = 4;
|
||||||
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
private org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
public boolean hasSetter() {
|
public boolean hasSetter() {
|
||||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||||
}
|
}
|
||||||
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter() {
|
public org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature getSetter() {
|
||||||
return setter_;
|
return setter_;
|
||||||
@@ -1586,18 +1915,18 @@ public final class JavaProtoBuf {
|
|||||||
}
|
}
|
||||||
setter_ = value;
|
setter_ = value;
|
||||||
|
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000008;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder setSetter(
|
public Builder setSetter(
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.Builder builderForValue) {
|
||||||
setter_ = builderForValue.build();
|
setter_ = builderForValue.build();
|
||||||
|
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000008;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder mergeSetter(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature value) {
|
public Builder mergeSetter(org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature value) {
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010) &&
|
if (((bitField0_ & 0x00000008) == 0x00000008) &&
|
||||||
setter_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance()) {
|
setter_ != org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance()) {
|
||||||
setter_ =
|
setter_ =
|
||||||
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder(setter_).mergeFrom(value).buildPartial();
|
org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.newBuilder(setter_).mergeFrom(value).buildPartial();
|
||||||
@@ -1605,13 +1934,13 @@ public final class JavaProtoBuf {
|
|||||||
setter_ = value;
|
setter_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000008;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public Builder clearSetter() {
|
public Builder clearSetter() {
|
||||||
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
setter_ = org.jetbrains.jet.descriptors.serialization.JavaProtoBuf.JavaMethodSignature.getDefaultInstance();
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+34
-23
@@ -54,19 +54,19 @@ public class JavaProtoBufUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class PropertyData {
|
public static class PropertyData {
|
||||||
private final Type type;
|
private final Type fieldType;
|
||||||
private final String fieldName;
|
private final String fieldName;
|
||||||
private final String syntheticMethodName;
|
private final String syntheticMethodName;
|
||||||
|
|
||||||
public PropertyData(@NotNull Type type, @Nullable String fieldName, @Nullable String syntheticMethodName) {
|
public PropertyData(@Nullable Type fieldType, @Nullable String fieldName, @Nullable String syntheticMethodName) {
|
||||||
this.type = type;
|
this.fieldType = fieldType;
|
||||||
this.fieldName = fieldName;
|
this.fieldName = fieldName;
|
||||||
this.syntheticMethodName = syntheticMethodName;
|
this.syntheticMethodName = syntheticMethodName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@Nullable
|
||||||
public Type getType() {
|
public Type getFieldType() {
|
||||||
return type;
|
return fieldType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -81,7 +81,7 @@ public class JavaProtoBufUtil {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return (fieldName != null ? "Field " + fieldName : "Synthetic method " + syntheticMethodName) + " " + type;
|
return fieldName != null ? "Field " + fieldName + " " + fieldType : "Synthetic method " + syntheticMethodName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,15 +90,19 @@ public class JavaProtoBufUtil {
|
|||||||
if (!proto.hasExtension(JavaProtoBuf.propertySignature)) return null;
|
if (!proto.hasExtension(JavaProtoBuf.propertySignature)) return null;
|
||||||
JavaProtoBuf.JavaPropertySignature propertySignature = proto.getExtension(JavaProtoBuf.propertySignature);
|
JavaProtoBuf.JavaPropertySignature propertySignature = proto.getExtension(JavaProtoBuf.propertySignature);
|
||||||
|
|
||||||
Type type = new Deserializer(nameResolver).type(propertySignature.getType());
|
if (propertySignature.hasField()) {
|
||||||
String fieldName = propertySignature.hasFieldName()
|
JavaProtoBuf.JavaFieldSignature field = propertySignature.getField();
|
||||||
? nameResolver.getName(propertySignature.getFieldName()).asString()
|
Type type = new Deserializer(nameResolver).type(field.getType());
|
||||||
: null;
|
Name name = nameResolver.getName(field.getName());
|
||||||
String syntheticMethodName = propertySignature.hasSyntheticMethodName()
|
return new PropertyData(type, name.asString(), null);
|
||||||
? nameResolver.getName(propertySignature.getSyntheticMethodName()).asString()
|
}
|
||||||
: null;
|
else if (propertySignature.hasSyntheticMethodName()) {
|
||||||
|
Name name = nameResolver.getName(propertySignature.getSyntheticMethodName());
|
||||||
return new PropertyData(type, fieldName, syntheticMethodName);
|
return new PropertyData(null, null, name.asString());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void saveMethodSignature(@NotNull ProtoBuf.Callable.Builder proto, @NotNull Method method, @NotNull NameTable nameTable) {
|
public static void saveMethodSignature(@NotNull ProtoBuf.Callable.Builder proto, @NotNull Method method, @NotNull NameTable nameTable) {
|
||||||
@@ -107,7 +111,7 @@ public class JavaProtoBufUtil {
|
|||||||
|
|
||||||
public static void savePropertySignature(
|
public static void savePropertySignature(
|
||||||
@NotNull ProtoBuf.Callable.Builder proto,
|
@NotNull ProtoBuf.Callable.Builder proto,
|
||||||
@NotNull Type type,
|
@Nullable Type fieldType,
|
||||||
@Nullable String fieldName,
|
@Nullable String fieldName,
|
||||||
@Nullable String syntheticMethodName,
|
@Nullable String syntheticMethodName,
|
||||||
@Nullable Method getter,
|
@Nullable Method getter,
|
||||||
@@ -115,7 +119,7 @@ public class JavaProtoBufUtil {
|
|||||||
@NotNull NameTable nameTable
|
@NotNull NameTable nameTable
|
||||||
) {
|
) {
|
||||||
proto.setExtension(JavaProtoBuf.propertySignature,
|
proto.setExtension(JavaProtoBuf.propertySignature,
|
||||||
new Serializer(nameTable).propertySignature(type, fieldName, syntheticMethodName, getter, setter));
|
new Serializer(nameTable).propertySignature(fieldType, fieldName, syntheticMethodName, getter, setter));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Serializer {
|
private static class Serializer {
|
||||||
@@ -142,7 +146,7 @@ public class JavaProtoBufUtil {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public JavaProtoBuf.JavaPropertySignature propertySignature(
|
public JavaProtoBuf.JavaPropertySignature propertySignature(
|
||||||
@NotNull Type type,
|
@Nullable Type fieldType,
|
||||||
@Nullable String fieldName,
|
@Nullable String fieldName,
|
||||||
@Nullable String syntheticMethodName,
|
@Nullable String syntheticMethodName,
|
||||||
@Nullable Method getter,
|
@Nullable Method getter,
|
||||||
@@ -150,10 +154,9 @@ public class JavaProtoBufUtil {
|
|||||||
) {
|
) {
|
||||||
JavaProtoBuf.JavaPropertySignature.Builder signature = JavaProtoBuf.JavaPropertySignature.newBuilder();
|
JavaProtoBuf.JavaPropertySignature.Builder signature = JavaProtoBuf.JavaPropertySignature.newBuilder();
|
||||||
|
|
||||||
signature.setType(type(type));
|
if (fieldType != null) {
|
||||||
|
assert fieldName != null : "Field name shouldn't be null when there's a field type: " + fieldType;
|
||||||
if (fieldName != null) {
|
signature.setField(fieldSignature(fieldType, fieldName));
|
||||||
signature.setFieldName(nameTable.getSimpleNameIndex(Name.guess(fieldName)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (syntheticMethodName != null) {
|
if (syntheticMethodName != null) {
|
||||||
@@ -170,6 +173,14 @@ public class JavaProtoBufUtil {
|
|||||||
return signature.build();
|
return signature.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public JavaProtoBuf.JavaFieldSignature fieldSignature(@NotNull Type type, @NotNull String name) {
|
||||||
|
JavaProtoBuf.JavaFieldSignature.Builder signature = JavaProtoBuf.JavaFieldSignature.newBuilder();
|
||||||
|
signature.setName(nameTable.getSimpleNameIndex(Name.guess(name)));
|
||||||
|
signature.setType(type(type));
|
||||||
|
return signature.build();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public JavaProtoBuf.JavaType type(@NotNull Type givenType) {
|
public JavaProtoBuf.JavaType type(@NotNull Type givenType) {
|
||||||
JavaProtoBuf.JavaType.Builder builder = JavaProtoBuf.JavaType.newBuilder();
|
JavaProtoBuf.JavaType.Builder builder = JavaProtoBuf.JavaType.newBuilder();
|
||||||
|
|||||||
+4
-4
@@ -215,7 +215,7 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
|
|||||||
case PROPERTY:
|
case PROPERTY:
|
||||||
JavaProtoBufUtil.PropertyData data = JavaProtoBufUtil.loadPropertyData(proto, nameResolver);
|
JavaProtoBufUtil.PropertyData data = JavaProtoBufUtil.loadPropertyData(proto, nameResolver);
|
||||||
return data == null ? null :
|
return data == null ? null :
|
||||||
MemberSignature.fromPropertyData(data.getType(), data.getFieldName(), data.getSyntheticMethodName());
|
MemberSignature.fromPropertyData(data.getFieldType(), data.getFieldName(), data.getSyntheticMethodName());
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -281,12 +281,12 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static MemberSignature fromPropertyData(
|
public static MemberSignature fromPropertyData(
|
||||||
@NotNull Type type,
|
@Nullable Type fieldType,
|
||||||
@Nullable String fieldName,
|
@Nullable String fieldName,
|
||||||
@Nullable String syntheticMethodName
|
@Nullable String syntheticMethodName
|
||||||
) {
|
) {
|
||||||
if (fieldName != null) {
|
if (fieldName != null && fieldType != null) {
|
||||||
return fromFieldNameAndDesc(fieldName, type.getDescriptor());
|
return fromFieldNameAndDesc(fieldName, fieldType.getDescriptor());
|
||||||
}
|
}
|
||||||
else if (syntheticMethodName != null) {
|
else if (syntheticMethodName != null) {
|
||||||
return fromMethodNameAndDesc(syntheticMethodName, JvmAbi.ANNOTATED_PROPERTY_METHOD_SIGNATURE);
|
return fromMethodNameAndDesc(syntheticMethodName, JvmAbi.ANNOTATED_PROPERTY_METHOD_SIGNATURE);
|
||||||
|
|||||||
Reference in New Issue
Block a user