Deserialize annotations on property setter parameters
This commit is contained in:
@@ -171,7 +171,6 @@ message Callable {
|
|||||||
*/
|
*/
|
||||||
optional int32 getter_flags = 9 /* absent => same as property */;
|
optional int32 getter_flags = 9 /* absent => same as property */;
|
||||||
optional int32 setter_flags = 10 /* absent => same as property */;
|
optional int32 setter_flags = 10 /* absent => same as property */;
|
||||||
optional int32 setter_parameter_name = 11;
|
|
||||||
|
|
||||||
repeated TypeParameter type_parameter = 4;
|
repeated TypeParameter type_parameter = 4;
|
||||||
|
|
||||||
@@ -192,6 +191,7 @@ message Callable {
|
|||||||
extensions 100 to 199;
|
extensions 100 to 199;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
repeated ValueParameter value_parameter = 7;
|
repeated ValueParameter value_parameter = 7;
|
||||||
|
|
||||||
required Type return_type = 8;
|
required Type return_type = 8;
|
||||||
|
|||||||
+11
-9
@@ -176,10 +176,11 @@ public class DescriptorDeserializer {
|
|||||||
modality(Flags.MODALITY.get(setterFlags)), visibility(Flags.VISIBILITY.get(setterFlags)),
|
modality(Flags.MODALITY.get(setterFlags)), visibility(Flags.VISIBILITY.get(setterFlags)),
|
||||||
isNotDefault, !isNotDefault, property.getKind()
|
isNotDefault, !isNotDefault, property.getKind()
|
||||||
);
|
);
|
||||||
setter.initialize(new ValueParameterDescriptorImpl(
|
DescriptorDeserializer setterLocal = local.createChildDeserializer(setter, Collections.<TypeParameter>emptyList(),
|
||||||
setter, 0, Collections.<AnnotationDescriptor>emptyList(),
|
Collections.<TypeParameterDescriptor>emptyList());
|
||||||
nameResolver.getName(proto.getSetterParameterName()),
|
List<ValueParameterDescriptor> valueParameters = setterLocal.valueParameters(proto, AnnotatedCallableKind.PROPERTY_SETTER);
|
||||||
property.getReturnType(), false, null));
|
assert valueParameters.size() == 1 : "Property setter should have a single value parameter: " + setter;
|
||||||
|
setter.initialize(valueParameters.get(0));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setter = DescriptorFactory.createDefaultSetter(property);
|
setter = DescriptorFactory.createDefaultSetter(property);
|
||||||
@@ -237,7 +238,7 @@ public class DescriptorDeserializer {
|
|||||||
local.typeDeserializer.typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null),
|
local.typeDeserializer.typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null),
|
||||||
getExpectedThisObject(),
|
getExpectedThisObject(),
|
||||||
typeParameters,
|
typeParameters,
|
||||||
local.valueParameters(proto),
|
local.valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
||||||
local.typeDeserializer.type(proto.getReturnType()),
|
local.typeDeserializer.type(proto.getReturnType()),
|
||||||
modality(Flags.MODALITY.get(flags)),
|
modality(Flags.MODALITY.get(flags)),
|
||||||
visibility(Flags.VISIBILITY.get(flags)),
|
visibility(Flags.VISIBILITY.get(flags)),
|
||||||
@@ -265,7 +266,7 @@ public class DescriptorDeserializer {
|
|||||||
DescriptorDeserializer local = createChildDeserializer(descriptor, Collections.<TypeParameter>emptyList(), typeParameters);
|
DescriptorDeserializer local = createChildDeserializer(descriptor, Collections.<TypeParameter>emptyList(), typeParameters);
|
||||||
descriptor.initialize(
|
descriptor.initialize(
|
||||||
classDescriptor.getTypeConstructor().getParameters(),
|
classDescriptor.getTypeConstructor().getParameters(),
|
||||||
local.valueParameters(proto),
|
local.valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
||||||
visibility(Flags.VISIBILITY.get(proto.getFlags())),
|
visibility(Flags.VISIBILITY.get(proto.getFlags())),
|
||||||
DescriptorUtils.isConstructorOfStaticNestedClass(descriptor)
|
DescriptorUtils.isConstructorOfStaticNestedClass(descriptor)
|
||||||
);
|
);
|
||||||
@@ -384,7 +385,7 @@ public class DescriptorDeserializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private List<ValueParameterDescriptor> valueParameters(@NotNull Callable callable) {
|
private List<ValueParameterDescriptor> valueParameters(@NotNull Callable callable, @NotNull AnnotatedCallableKind kind) {
|
||||||
DeclarationDescriptor containerOfCallable = containingDeclaration.getContainingDeclaration();
|
DeclarationDescriptor containerOfCallable = containingDeclaration.getContainingDeclaration();
|
||||||
assert containerOfCallable instanceof ClassOrNamespaceDescriptor
|
assert containerOfCallable instanceof ClassOrNamespaceDescriptor
|
||||||
: "Only members in classes or namespaces should be serialized: " + containerOfCallable;
|
: "Only members in classes or namespaces should be serialized: " + containerOfCallable;
|
||||||
@@ -397,7 +398,7 @@ public class DescriptorDeserializer {
|
|||||||
result.add(new ValueParameterDescriptorImpl(
|
result.add(new ValueParameterDescriptorImpl(
|
||||||
containingDeclaration,
|
containingDeclaration,
|
||||||
i,
|
i,
|
||||||
getAnnotations(classOrNamespace, callable, proto),
|
getAnnotations(classOrNamespace, callable, kind, proto),
|
||||||
nameResolver.getName(proto.getName()),
|
nameResolver.getName(proto.getName()),
|
||||||
typeDeserializer.type(proto.getType()),
|
typeDeserializer.type(proto.getType()),
|
||||||
Flags.DECLARES_DEFAULT_VALUE.get(proto.getFlags()),
|
Flags.DECLARES_DEFAULT_VALUE.get(proto.getFlags()),
|
||||||
@@ -411,10 +412,11 @@ public class DescriptorDeserializer {
|
|||||||
private List<AnnotationDescriptor> getAnnotations(
|
private List<AnnotationDescriptor> getAnnotations(
|
||||||
@NotNull ClassOrNamespaceDescriptor classOrNamespace,
|
@NotNull ClassOrNamespaceDescriptor classOrNamespace,
|
||||||
@NotNull Callable callable,
|
@NotNull Callable callable,
|
||||||
|
@NotNull AnnotatedCallableKind kind,
|
||||||
@NotNull Callable.ValueParameter valueParameter
|
@NotNull Callable.ValueParameter valueParameter
|
||||||
) {
|
) {
|
||||||
return Flags.HAS_ANNOTATIONS.get(valueParameter.getFlags())
|
return Flags.HAS_ANNOTATIONS.get(valueParameter.getFlags())
|
||||||
? annotationDeserializer.loadValueParameterAnnotations(classOrNamespace, callable, nameResolver, valueParameter)
|
? annotationDeserializer.loadValueParameterAnnotations(classOrNamespace, callable, nameResolver, kind, valueParameter)
|
||||||
: Collections.<AnnotationDescriptor>emptyList();
|
: Collections.<AnnotationDescriptor>emptyList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -145,6 +145,8 @@ public class DescriptorSerializer {
|
|||||||
public ProtoBuf.Callable.Builder callableProto(@NotNull CallableMemberDescriptor descriptor) {
|
public ProtoBuf.Callable.Builder callableProto(@NotNull CallableMemberDescriptor descriptor) {
|
||||||
ProtoBuf.Callable.Builder builder = ProtoBuf.Callable.newBuilder();
|
ProtoBuf.Callable.Builder builder = ProtoBuf.Callable.newBuilder();
|
||||||
|
|
||||||
|
DescriptorSerializer local = createChildSerializer();
|
||||||
|
|
||||||
boolean hasGetter = false;
|
boolean hasGetter = false;
|
||||||
boolean hasSetter = false;
|
boolean hasSetter = false;
|
||||||
if (descriptor instanceof PropertyDescriptor) {
|
if (descriptor instanceof PropertyDescriptor) {
|
||||||
@@ -175,9 +177,9 @@ public class DescriptorSerializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!setter.isDefault()) {
|
if (!setter.isDefault()) {
|
||||||
List<ValueParameterDescriptor> parameters = setter.getValueParameters();
|
for (ValueParameterDescriptor valueParameterDescriptor : setter.getValueParameters()) {
|
||||||
assert parameters.size() == 1 : "Unexpected number of setter parameters: " + setter;
|
builder.addValueParameter(local.valueParameter(valueParameterDescriptor));
|
||||||
builder.setSetterParameterName(nameTable.getSimpleNameIndex(parameters.get(0).getName()));
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,8 +197,6 @@ public class DescriptorSerializer {
|
|||||||
));
|
));
|
||||||
//TODO builder.setExtraVisibility()
|
//TODO builder.setExtraVisibility()
|
||||||
|
|
||||||
DescriptorSerializer local = createChildSerializer();
|
|
||||||
|
|
||||||
for (TypeParameterDescriptor typeParameterDescriptor : descriptor.getTypeParameters()) {
|
for (TypeParameterDescriptor typeParameterDescriptor : descriptor.getTypeParameters()) {
|
||||||
builder.addTypeParameter(local.typeParameter(typeParameterDescriptor));
|
builder.addTypeParameter(local.typeParameter(typeParameterDescriptor));
|
||||||
}
|
}
|
||||||
|
|||||||
+138
-139
@@ -7125,16 +7125,6 @@ public final class ProtoBuf {
|
|||||||
*/
|
*/
|
||||||
int getSetterFlags();
|
int getSetterFlags();
|
||||||
|
|
||||||
// optional int32 setter_parameter_name = 11;
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
boolean hasSetterParameterName();
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
int getSetterParameterName();
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;</code>
|
||||||
@@ -7173,15 +7163,27 @@ public final class ProtoBuf {
|
|||||||
// repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;
|
// repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>
|
java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>
|
||||||
getValueParameterList();
|
getValueParameterList();
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index);
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index);
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
int getValueParameterCount();
|
int getValueParameterCount();
|
||||||
|
|
||||||
@@ -7249,16 +7251,16 @@ public final class ProtoBuf {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 34: {
|
case 34: {
|
||||||
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
|
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
typeParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter>();
|
typeParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter>();
|
||||||
mutable_bitField0_ |= 0x00000020;
|
mutable_bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
typeParameter_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter.PARSER, extensionRegistry));
|
typeParameter_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter.PARSER, extensionRegistry));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 42: {
|
case 42: {
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder subBuilder = null;
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder subBuilder = null;
|
||||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
subBuilder = receiverType_.toBuilder();
|
subBuilder = receiverType_.toBuilder();
|
||||||
}
|
}
|
||||||
receiverType_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.PARSER, extensionRegistry);
|
receiverType_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.PARSER, extensionRegistry);
|
||||||
@@ -7266,25 +7268,25 @@ public final class ProtoBuf {
|
|||||||
subBuilder.mergeFrom(receiverType_);
|
subBuilder.mergeFrom(receiverType_);
|
||||||
receiverType_ = subBuilder.buildPartial();
|
receiverType_ = subBuilder.buildPartial();
|
||||||
}
|
}
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000010;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 48: {
|
case 48: {
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000020;
|
||||||
name_ = input.readInt32();
|
name_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 58: {
|
case 58: {
|
||||||
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
|
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
|
||||||
valueParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>();
|
valueParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>();
|
||||||
mutable_bitField0_ |= 0x00000100;
|
mutable_bitField0_ |= 0x00000080;
|
||||||
}
|
}
|
||||||
valueParameter_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.PARSER, extensionRegistry));
|
valueParameter_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.PARSER, extensionRegistry));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 66: {
|
case 66: {
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder subBuilder = null;
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder subBuilder = null;
|
||||||
if (((bitField0_ & 0x00000080) == 0x00000080)) {
|
if (((bitField0_ & 0x00000040) == 0x00000040)) {
|
||||||
subBuilder = returnType_.toBuilder();
|
subBuilder = returnType_.toBuilder();
|
||||||
}
|
}
|
||||||
returnType_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.PARSER, extensionRegistry);
|
returnType_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.PARSER, extensionRegistry);
|
||||||
@@ -7292,7 +7294,7 @@ public final class ProtoBuf {
|
|||||||
subBuilder.mergeFrom(returnType_);
|
subBuilder.mergeFrom(returnType_);
|
||||||
returnType_ = subBuilder.buildPartial();
|
returnType_ = subBuilder.buildPartial();
|
||||||
}
|
}
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000040;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 72: {
|
case 72: {
|
||||||
@@ -7305,11 +7307,6 @@ public final class ProtoBuf {
|
|||||||
setterFlags_ = input.readInt32();
|
setterFlags_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 88: {
|
|
||||||
bitField0_ |= 0x00000010;
|
|
||||||
setterParameterName_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -7318,10 +7315,10 @@ public final class ProtoBuf {
|
|||||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||||
e.getMessage()).setUnfinishedMessage(this);
|
e.getMessage()).setUnfinishedMessage(this);
|
||||||
} finally {
|
} finally {
|
||||||
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
|
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_);
|
typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_);
|
||||||
}
|
}
|
||||||
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
|
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
|
||||||
valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_);
|
valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_);
|
||||||
}
|
}
|
||||||
makeExtensionsImmutable();
|
makeExtensionsImmutable();
|
||||||
@@ -8405,22 +8402,6 @@ public final class ProtoBuf {
|
|||||||
return setterFlags_;
|
return setterFlags_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional int32 setter_parameter_name = 11;
|
|
||||||
public static final int SETTER_PARAMETER_NAME_FIELD_NUMBER = 11;
|
|
||||||
private int setterParameterName_;
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasSetterParameterName() {
|
|
||||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public int getSetterParameterName() {
|
|
||||||
return setterParameterName_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
||||||
public static final int TYPE_PARAMETER_FIELD_NUMBER = 4;
|
public static final int TYPE_PARAMETER_FIELD_NUMBER = 4;
|
||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter> typeParameter_;
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter> typeParameter_;
|
||||||
@@ -8464,7 +8445,7 @@ public final class ProtoBuf {
|
|||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasReceiverType() {
|
public boolean hasReceiverType() {
|
||||||
return ((bitField0_ & 0x00000020) == 0x00000020);
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
||||||
@@ -8480,7 +8461,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasName() {
|
public boolean hasName() {
|
||||||
return ((bitField0_ & 0x00000040) == 0x00000040);
|
return ((bitField0_ & 0x00000020) == 0x00000020);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
@@ -8494,12 +8475,20 @@ public final class ProtoBuf {
|
|||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> valueParameter_;
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> valueParameter_;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> getValueParameterList() {
|
public java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> getValueParameterList() {
|
||||||
return valueParameter_;
|
return valueParameter_;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public java.util.List<? extends org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameterOrBuilder>
|
public java.util.List<? extends org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameterOrBuilder>
|
||||||
getValueParameterOrBuilderList() {
|
getValueParameterOrBuilderList() {
|
||||||
@@ -8507,18 +8496,30 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public int getValueParameterCount() {
|
public int getValueParameterCount() {
|
||||||
return valueParameter_.size();
|
return valueParameter_.size();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index) {
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index) {
|
||||||
return valueParameter_.get(index);
|
return valueParameter_.get(index);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameterOrBuilder getValueParameterOrBuilder(
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameterOrBuilder getValueParameterOrBuilder(
|
||||||
int index) {
|
int index) {
|
||||||
@@ -8532,7 +8533,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasReturnType() {
|
public boolean hasReturnType() {
|
||||||
return ((bitField0_ & 0x00000080) == 0x00000080);
|
return ((bitField0_ & 0x00000040) == 0x00000040);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
||||||
@@ -8546,7 +8547,6 @@ public final class ProtoBuf {
|
|||||||
extraVisibility_ = "";
|
extraVisibility_ = "";
|
||||||
getterFlags_ = 0;
|
getterFlags_ = 0;
|
||||||
setterFlags_ = 0;
|
setterFlags_ = 0;
|
||||||
setterParameterName_ = 0;
|
|
||||||
typeParameter_ = java.util.Collections.emptyList();
|
typeParameter_ = java.util.Collections.emptyList();
|
||||||
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
@@ -8611,16 +8611,16 @@ public final class ProtoBuf {
|
|||||||
for (int i = 0; i < typeParameter_.size(); i++) {
|
for (int i = 0; i < typeParameter_.size(); i++) {
|
||||||
output.writeMessage(4, typeParameter_.get(i));
|
output.writeMessage(4, typeParameter_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
output.writeMessage(5, receiverType_);
|
output.writeMessage(5, receiverType_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000040) == 0x00000040)) {
|
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
||||||
output.writeInt32(6, name_);
|
output.writeInt32(6, name_);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < valueParameter_.size(); i++) {
|
for (int i = 0; i < valueParameter_.size(); i++) {
|
||||||
output.writeMessage(7, valueParameter_.get(i));
|
output.writeMessage(7, valueParameter_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000080) == 0x00000080)) {
|
if (((bitField0_ & 0x00000040) == 0x00000040)) {
|
||||||
output.writeMessage(8, returnType_);
|
output.writeMessage(8, returnType_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
@@ -8629,9 +8629,6 @@ public final class ProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
output.writeInt32(10, setterFlags_);
|
output.writeInt32(10, setterFlags_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
output.writeInt32(11, setterParameterName_);
|
|
||||||
}
|
|
||||||
extensionWriter.writeUntil(200, output);
|
extensionWriter.writeUntil(200, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8653,11 +8650,11 @@ public final class ProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(4, typeParameter_.get(i));
|
.computeMessageSize(4, typeParameter_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(5, receiverType_);
|
.computeMessageSize(5, receiverType_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000040) == 0x00000040)) {
|
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(6, name_);
|
.computeInt32Size(6, name_);
|
||||||
}
|
}
|
||||||
@@ -8665,7 +8662,7 @@ public final class ProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(7, valueParameter_.get(i));
|
.computeMessageSize(7, valueParameter_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000080) == 0x00000080)) {
|
if (((bitField0_ & 0x00000040) == 0x00000040)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(8, returnType_);
|
.computeMessageSize(8, returnType_);
|
||||||
}
|
}
|
||||||
@@ -8677,10 +8674,6 @@ public final class ProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(10, setterFlags_);
|
.computeInt32Size(10, setterFlags_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
size += com.google.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(11, setterParameterName_);
|
|
||||||
}
|
|
||||||
size += extensionsSerializedSize();
|
size += extensionsSerializedSize();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -8780,18 +8773,16 @@ public final class ProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
setterFlags_ = 0;
|
setterFlags_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
setterParameterName_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
|
||||||
typeParameter_ = java.util.Collections.emptyList();
|
typeParameter_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000020);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000040);
|
bitField0_ = (bitField0_ & ~0x00000020);
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000080);
|
bitField0_ = (bitField0_ & ~0x00000040);
|
||||||
valueParameter_ = java.util.Collections.emptyList();
|
valueParameter_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
bitField0_ = (bitField0_ & ~0x00000080);
|
||||||
returnType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
returnType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8831,30 +8822,26 @@ public final class ProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000008;
|
to_bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
result.setterFlags_ = setterFlags_;
|
result.setterFlags_ = setterFlags_;
|
||||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
to_bitField0_ |= 0x00000010;
|
|
||||||
}
|
|
||||||
result.setterParameterName_ = setterParameterName_;
|
|
||||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
|
||||||
typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_);
|
typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_);
|
||||||
bitField0_ = (bitField0_ & ~0x00000020);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
}
|
}
|
||||||
result.typeParameter_ = typeParameter_;
|
result.typeParameter_ = typeParameter_;
|
||||||
|
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
|
||||||
|
to_bitField0_ |= 0x00000010;
|
||||||
|
}
|
||||||
|
result.receiverType_ = receiverType_;
|
||||||
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
|
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
|
||||||
to_bitField0_ |= 0x00000020;
|
to_bitField0_ |= 0x00000020;
|
||||||
}
|
}
|
||||||
result.receiverType_ = receiverType_;
|
|
||||||
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
|
|
||||||
to_bitField0_ |= 0x00000040;
|
|
||||||
}
|
|
||||||
result.name_ = name_;
|
result.name_ = name_;
|
||||||
if (((bitField0_ & 0x00000100) == 0x00000100)) {
|
if (((bitField0_ & 0x00000080) == 0x00000080)) {
|
||||||
valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_);
|
valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_);
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
bitField0_ = (bitField0_ & ~0x00000080);
|
||||||
}
|
}
|
||||||
result.valueParameter_ = valueParameter_;
|
result.valueParameter_ = valueParameter_;
|
||||||
if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
|
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
|
||||||
to_bitField0_ |= 0x00000080;
|
to_bitField0_ |= 0x00000040;
|
||||||
}
|
}
|
||||||
result.returnType_ = returnType_;
|
result.returnType_ = returnType_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
@@ -8877,13 +8864,10 @@ public final class ProtoBuf {
|
|||||||
if (other.hasSetterFlags()) {
|
if (other.hasSetterFlags()) {
|
||||||
setSetterFlags(other.getSetterFlags());
|
setSetterFlags(other.getSetterFlags());
|
||||||
}
|
}
|
||||||
if (other.hasSetterParameterName()) {
|
|
||||||
setSetterParameterName(other.getSetterParameterName());
|
|
||||||
}
|
|
||||||
if (!other.typeParameter_.isEmpty()) {
|
if (!other.typeParameter_.isEmpty()) {
|
||||||
if (typeParameter_.isEmpty()) {
|
if (typeParameter_.isEmpty()) {
|
||||||
typeParameter_ = other.typeParameter_;
|
typeParameter_ = other.typeParameter_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000020);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
} else {
|
} else {
|
||||||
ensureTypeParameterIsMutable();
|
ensureTypeParameterIsMutable();
|
||||||
typeParameter_.addAll(other.typeParameter_);
|
typeParameter_.addAll(other.typeParameter_);
|
||||||
@@ -8899,7 +8883,7 @@ public final class ProtoBuf {
|
|||||||
if (!other.valueParameter_.isEmpty()) {
|
if (!other.valueParameter_.isEmpty()) {
|
||||||
if (valueParameter_.isEmpty()) {
|
if (valueParameter_.isEmpty()) {
|
||||||
valueParameter_ = other.valueParameter_;
|
valueParameter_ = other.valueParameter_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
bitField0_ = (bitField0_ & ~0x00000080);
|
||||||
} else {
|
} else {
|
||||||
ensureValueParameterIsMutable();
|
ensureValueParameterIsMutable();
|
||||||
valueParameter_.addAll(other.valueParameter_);
|
valueParameter_.addAll(other.valueParameter_);
|
||||||
@@ -9247,46 +9231,13 @@ public final class ProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional int32 setter_parameter_name = 11;
|
|
||||||
private int setterParameterName_ ;
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasSetterParameterName() {
|
|
||||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public int getSetterParameterName() {
|
|
||||||
return setterParameterName_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public Builder setSetterParameterName(int value) {
|
|
||||||
bitField0_ |= 0x00000010;
|
|
||||||
setterParameterName_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 setter_parameter_name = 11;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearSetterParameterName() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
|
||||||
setterParameterName_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
// repeated .org.jetbrains.jet.descriptors.serialization.TypeParameter type_parameter = 4;
|
||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter> typeParameter_ =
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter> typeParameter_ =
|
||||||
java.util.Collections.emptyList();
|
java.util.Collections.emptyList();
|
||||||
private void ensureTypeParameterIsMutable() {
|
private void ensureTypeParameterIsMutable() {
|
||||||
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
|
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
typeParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter>(typeParameter_);
|
typeParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.TypeParameter>(typeParameter_);
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9391,7 +9342,7 @@ public final class ProtoBuf {
|
|||||||
*/
|
*/
|
||||||
public Builder clearTypeParameter() {
|
public Builder clearTypeParameter() {
|
||||||
typeParameter_ = java.util.Collections.emptyList();
|
typeParameter_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000020);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -9411,7 +9362,7 @@ public final class ProtoBuf {
|
|||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasReceiverType() {
|
public boolean hasReceiverType() {
|
||||||
return ((bitField0_ & 0x00000040) == 0x00000040);
|
return ((bitField0_ & 0x00000020) == 0x00000020);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
||||||
@@ -9428,7 +9379,7 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
receiverType_ = value;
|
receiverType_ = value;
|
||||||
|
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000020;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -9438,14 +9389,14 @@ public final class ProtoBuf {
|
|||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder builderForValue) {
|
||||||
receiverType_ = builderForValue.build();
|
receiverType_ = builderForValue.build();
|
||||||
|
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000020;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
* <code>optional .org.jetbrains.jet.descriptors.serialization.Type receiver_type = 5;</code>
|
||||||
*/
|
*/
|
||||||
public Builder mergeReceiverType(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type value) {
|
public Builder mergeReceiverType(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type value) {
|
||||||
if (((bitField0_ & 0x00000040) == 0x00000040) &&
|
if (((bitField0_ & 0x00000020) == 0x00000020) &&
|
||||||
receiverType_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance()) {
|
receiverType_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance()) {
|
||||||
receiverType_ =
|
receiverType_ =
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial();
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial();
|
||||||
@@ -9453,7 +9404,7 @@ public final class ProtoBuf {
|
|||||||
receiverType_ = value;
|
receiverType_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000020;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -9462,7 +9413,7 @@ public final class ProtoBuf {
|
|||||||
public Builder clearReceiverType() {
|
public Builder clearReceiverType() {
|
||||||
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
receiverType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000040);
|
bitField0_ = (bitField0_ & ~0x00000020);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9472,7 +9423,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasName() {
|
public boolean hasName() {
|
||||||
return ((bitField0_ & 0x00000080) == 0x00000080);
|
return ((bitField0_ & 0x00000040) == 0x00000040);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
@@ -9484,7 +9435,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
*/
|
*/
|
||||||
public Builder setName(int value) {
|
public Builder setName(int value) {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000040;
|
||||||
name_ = value;
|
name_ = value;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@@ -9493,7 +9444,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required int32 name = 6;</code>
|
* <code>required int32 name = 6;</code>
|
||||||
*/
|
*/
|
||||||
public Builder clearName() {
|
public Builder clearName() {
|
||||||
bitField0_ = (bitField0_ & ~0x00000080);
|
bitField0_ = (bitField0_ & ~0x00000040);
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@@ -9503,32 +9454,48 @@ public final class ProtoBuf {
|
|||||||
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> valueParameter_ =
|
private java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> valueParameter_ =
|
||||||
java.util.Collections.emptyList();
|
java.util.Collections.emptyList();
|
||||||
private void ensureValueParameterIsMutable() {
|
private void ensureValueParameterIsMutable() {
|
||||||
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
|
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
|
||||||
valueParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>(valueParameter_);
|
valueParameter_ = new java.util.ArrayList<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter>(valueParameter_);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000080;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> getValueParameterList() {
|
public java.util.List<org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> getValueParameterList() {
|
||||||
return java.util.Collections.unmodifiableList(valueParameter_);
|
return java.util.Collections.unmodifiableList(valueParameter_);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public int getValueParameterCount() {
|
public int getValueParameterCount() {
|
||||||
return valueParameter_.size();
|
return valueParameter_.size();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index) {
|
public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter getValueParameter(int index) {
|
||||||
return valueParameter_.get(index);
|
return valueParameter_.get(index);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder setValueParameter(
|
public Builder setValueParameter(
|
||||||
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
||||||
@@ -9542,6 +9509,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder setValueParameter(
|
public Builder setValueParameter(
|
||||||
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
||||||
@@ -9552,6 +9523,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder addValueParameter(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
public Builder addValueParameter(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
@@ -9564,6 +9539,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder addValueParameter(
|
public Builder addValueParameter(
|
||||||
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter value) {
|
||||||
@@ -9577,6 +9556,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder addValueParameter(
|
public Builder addValueParameter(
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
||||||
@@ -9587,6 +9570,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder addValueParameter(
|
public Builder addValueParameter(
|
||||||
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
int index, org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter.Builder builderForValue) {
|
||||||
@@ -9597,6 +9584,10 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder addAllValueParameter(
|
public Builder addAllValueParameter(
|
||||||
java.lang.Iterable<? extends org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> values) {
|
java.lang.Iterable<? extends org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.ValueParameter> values) {
|
||||||
@@ -9607,15 +9598,23 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder clearValueParameter() {
|
public Builder clearValueParameter() {
|
||||||
valueParameter_ = java.util.Collections.emptyList();
|
valueParameter_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000100);
|
bitField0_ = (bitField0_ & ~0x00000080);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
* <code>repeated .org.jetbrains.jet.descriptors.serialization.Callable.ValueParameter value_parameter = 7;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Value parameters for functions and constructors, or setter value parameter for properties
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public Builder removeValueParameter(int index) {
|
public Builder removeValueParameter(int index) {
|
||||||
ensureValueParameterIsMutable();
|
ensureValueParameterIsMutable();
|
||||||
@@ -9630,7 +9629,7 @@ public final class ProtoBuf {
|
|||||||
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasReturnType() {
|
public boolean hasReturnType() {
|
||||||
return ((bitField0_ & 0x00000200) == 0x00000200);
|
return ((bitField0_ & 0x00000100) == 0x00000100);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
||||||
@@ -9647,7 +9646,7 @@ public final class ProtoBuf {
|
|||||||
}
|
}
|
||||||
returnType_ = value;
|
returnType_ = value;
|
||||||
|
|
||||||
bitField0_ |= 0x00000200;
|
bitField0_ |= 0x00000100;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -9657,14 +9656,14 @@ public final class ProtoBuf {
|
|||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder builderForValue) {
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.Builder builderForValue) {
|
||||||
returnType_ = builderForValue.build();
|
returnType_ = builderForValue.build();
|
||||||
|
|
||||||
bitField0_ |= 0x00000200;
|
bitField0_ |= 0x00000100;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
* <code>required .org.jetbrains.jet.descriptors.serialization.Type return_type = 8;</code>
|
||||||
*/
|
*/
|
||||||
public Builder mergeReturnType(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type value) {
|
public Builder mergeReturnType(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type value) {
|
||||||
if (((bitField0_ & 0x00000200) == 0x00000200) &&
|
if (((bitField0_ & 0x00000100) == 0x00000100) &&
|
||||||
returnType_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance()) {
|
returnType_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance()) {
|
||||||
returnType_ =
|
returnType_ =
|
||||||
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.newBuilder(returnType_).mergeFrom(value).buildPartial();
|
org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.newBuilder(returnType_).mergeFrom(value).buildPartial();
|
||||||
@@ -9672,7 +9671,7 @@ public final class ProtoBuf {
|
|||||||
returnType_ = value;
|
returnType_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitField0_ |= 0x00000200;
|
bitField0_ |= 0x00000100;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -9681,7 +9680,7 @@ public final class ProtoBuf {
|
|||||||
public Builder clearReturnType() {
|
public Builder clearReturnType() {
|
||||||
returnType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
returnType_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Type.getDefaultInstance();
|
||||||
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000200);
|
bitField0_ = (bitField0_ & ~0x00000100);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
-7
@@ -138,17 +138,25 @@ public class TypeDeserializer {
|
|||||||
|
|
||||||
return classDescriptor.getTypeConstructor();
|
return classDescriptor.getTypeConstructor();
|
||||||
case TYPE_PARAMETER:
|
case TYPE_PARAMETER:
|
||||||
TypeParameterDescriptor descriptor = typeParameterDescriptors.get(proto.getId());
|
return typeParameterTypeConstructor(proto);
|
||||||
if (descriptor == null && parent != null) {
|
|
||||||
descriptor = parent.typeParameterDescriptors.get(proto.getId());
|
|
||||||
}
|
|
||||||
if (descriptor == null) return null;
|
|
||||||
|
|
||||||
return descriptor.getTypeConstructor();
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException("Unknown kind " + proto.getKind());
|
throw new IllegalStateException("Unknown kind " + proto.getKind());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private TypeConstructor typeParameterTypeConstructor(@NotNull ProtoBuf.Type.Constructor proto) {
|
||||||
|
TypeParameterDescriptor descriptor = typeParameterDescriptors.get(proto.getId());
|
||||||
|
if (descriptor != null) {
|
||||||
|
return descriptor.getTypeConstructor();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parent != null) {
|
||||||
|
return parent.typeParameterTypeConstructor(proto);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private ClassDescriptor computeClassDescriptor(int fqNameIndex) {
|
private ClassDescriptor computeClassDescriptor(int fqNameIndex) {
|
||||||
ClassId classId = nameResolver.getClassId(fqNameIndex);
|
ClassId classId = nameResolver.getClassId(fqNameIndex);
|
||||||
|
|||||||
+2
@@ -50,6 +50,7 @@ public interface AnnotationDeserializer {
|
|||||||
@NotNull ClassOrNamespaceDescriptor container,
|
@NotNull ClassOrNamespaceDescriptor container,
|
||||||
@NotNull ProtoBuf.Callable callable,
|
@NotNull ProtoBuf.Callable callable,
|
||||||
@NotNull NameResolver nameResolver,
|
@NotNull NameResolver nameResolver,
|
||||||
|
@NotNull AnnotatedCallableKind kind,
|
||||||
@NotNull ProtoBuf.Callable.ValueParameter proto
|
@NotNull ProtoBuf.Callable.ValueParameter proto
|
||||||
) {
|
) {
|
||||||
return notSupported();
|
return notSupported();
|
||||||
@@ -84,6 +85,7 @@ public interface AnnotationDeserializer {
|
|||||||
@NotNull ClassOrNamespaceDescriptor container,
|
@NotNull ClassOrNamespaceDescriptor container,
|
||||||
@NotNull ProtoBuf.Callable callable,
|
@NotNull ProtoBuf.Callable callable,
|
||||||
@NotNull NameResolver nameResolver,
|
@NotNull NameResolver nameResolver,
|
||||||
|
@NotNull AnnotatedCallableKind kind,
|
||||||
@NotNull ProtoBuf.Callable.ValueParameter proto
|
@NotNull ProtoBuf.Callable.ValueParameter proto
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
WARNING: $TESTDATA_DIR$/wrongAbiVersion.kt: (3, 9) Parameter 'x' is never used
|
WARNING: $TESTDATA_DIR$/wrongAbiVersion.kt: (3, 9) Parameter 'x' is never used
|
||||||
ERROR: $TESTDATA_DIR$/wrongAbiVersion.kt: (4, 3) Unresolved reference: bar
|
ERROR: $TESTDATA_DIR$/wrongAbiVersion.kt: (4, 3) Unresolved reference: bar
|
||||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.class: (0, 0) Class 'wrong/WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 10
|
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.class: (0, 0) Class 'wrong/WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 11
|
||||||
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.class: (0, 0) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 10
|
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.class: (0, 0) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 11
|
||||||
COMPILATION_ERROR
|
COMPILATION_ERROR
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
annotation class A
|
||||||
|
|
||||||
|
class Class {
|
||||||
|
var Int.foo: Int
|
||||||
|
get() = this
|
||||||
|
set([A] value) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal final annotation class A : jet.Annotation {
|
||||||
|
/*primary*/ public constructor A()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal final class Class {
|
||||||
|
/*primary*/ public constructor Class()
|
||||||
|
internal final var jet.Int.foo: jet.Int
|
||||||
|
internal final fun jet.Int.<get-foo>(): jet.Int
|
||||||
|
internal final fun jet.Int.<set-foo>(/*0*/ test.A() value: jet.Int): jet.Unit
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
annotation class A
|
||||||
|
|
||||||
|
class Class {
|
||||||
|
var foo: Int
|
||||||
|
get() = 42
|
||||||
|
set([A] value) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal final annotation class A : jet.Annotation {
|
||||||
|
/*primary*/ public constructor A()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal final class Class {
|
||||||
|
/*primary*/ public constructor Class()
|
||||||
|
internal final var foo: jet.Int
|
||||||
|
internal final fun <get-foo>(): jet.Int
|
||||||
|
internal final fun <set-foo>(/*0*/ test.A() value: jet.Int): jet.Unit
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
annotation class A
|
||||||
|
annotation class B
|
||||||
|
|
||||||
|
var foo: Int
|
||||||
|
get() = 42
|
||||||
|
set([A B] value) {}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal var foo: jet.Int
|
||||||
|
internal fun <get-foo>(): jet.Int
|
||||||
|
internal fun <set-foo>(/*0*/ test.A() test.B() value: jet.Int): jet.Unit
|
||||||
|
|
||||||
|
internal final annotation class A : jet.Annotation {
|
||||||
|
/*primary*/ public constructor A()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal final annotation class B : jet.Annotation {
|
||||||
|
/*primary*/ public constructor B()
|
||||||
|
}
|
||||||
@@ -209,6 +209,11 @@ public class LoadCompiledKotlinTestGenerated extends AbstractLoadCompiledKotlinT
|
|||||||
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionFunctionInClass.kt");
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionFunctionInClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionPropertySetter.kt")
|
||||||
|
public void testExtensionPropertySetter() throws Exception {
|
||||||
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionPropertySetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("FunctionInClass.kt")
|
@TestMetadata("FunctionInClass.kt")
|
||||||
public void testFunctionInClass() throws Exception {
|
public void testFunctionInClass() throws Exception {
|
||||||
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/FunctionInClass.kt");
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/FunctionInClass.kt");
|
||||||
@@ -224,11 +229,21 @@ public class LoadCompiledKotlinTestGenerated extends AbstractLoadCompiledKotlinT
|
|||||||
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/ManyAnnotations.kt");
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/ManyAnnotations.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("PropertySetterInClass.kt")
|
||||||
|
public void testPropertySetterInClass() throws Exception {
|
||||||
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/PropertySetterInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("TopLevelFunction.kt")
|
@TestMetadata("TopLevelFunction.kt")
|
||||||
public void testTopLevelFunction() throws Exception {
|
public void testTopLevelFunction() throws Exception {
|
||||||
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelFunction.kt");
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelFunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("TopLevelPropertySetter.kt")
|
||||||
|
public void testTopLevelPropertySetter() throws Exception {
|
||||||
|
doTestWithAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelPropertySetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadKotlin/annotations/propertiesWithoutBackingFields")
|
@TestMetadata("compiler/testData/loadKotlin/annotations/propertiesWithoutBackingFields")
|
||||||
|
|||||||
+15
@@ -211,6 +211,11 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
|||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionFunctionInClass.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionFunctionInClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionPropertySetter.kt")
|
||||||
|
public void testExtensionPropertySetter() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/ExtensionPropertySetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("FunctionInClass.kt")
|
@TestMetadata("FunctionInClass.kt")
|
||||||
public void testFunctionInClass() throws Exception {
|
public void testFunctionInClass() throws Exception {
|
||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/FunctionInClass.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/FunctionInClass.kt");
|
||||||
@@ -226,11 +231,21 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
|||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/ManyAnnotations.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/ManyAnnotations.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("PropertySetterInClass.kt")
|
||||||
|
public void testPropertySetterInClass() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/PropertySetterInClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("TopLevelFunction.kt")
|
@TestMetadata("TopLevelFunction.kt")
|
||||||
public void testTopLevelFunction() throws Exception {
|
public void testTopLevelFunction() throws Exception {
|
||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelFunction.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelFunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("TopLevelPropertySetter.kt")
|
||||||
|
public void testTopLevelPropertySetter() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/annotations/parameters/TopLevelPropertySetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadKotlin/annotations/propertiesWithoutBackingFields")
|
@TestMetadata("compiler/testData/loadKotlin/annotations/propertiesWithoutBackingFields")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public final class JvmAbi {
|
|||||||
* This constant is used to identify binary format (class file) versions
|
* This constant is used to identify binary format (class file) versions
|
||||||
* If you change class file metadata format and/or naming conventions, please increase this number
|
* If you change class file metadata format and/or naming conventions, please increase this number
|
||||||
*/
|
*/
|
||||||
public static final int VERSION = 10;
|
public static final int VERSION = 11;
|
||||||
|
|
||||||
public static final String TRAIT_IMPL_CLASS_NAME = "$TImpl";
|
public static final String TRAIT_IMPL_CLASS_NAME = "$TImpl";
|
||||||
public static final String TRAIT_IMPL_SUFFIX = "$" + TRAIT_IMPL_CLASS_NAME;
|
public static final String TRAIT_IMPL_SUFFIX = "$" + TRAIT_IMPL_CLASS_NAME;
|
||||||
|
|||||||
+3
-4
@@ -507,16 +507,15 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
|
|||||||
@NotNull ClassOrNamespaceDescriptor container,
|
@NotNull ClassOrNamespaceDescriptor container,
|
||||||
@NotNull ProtoBuf.Callable callable,
|
@NotNull ProtoBuf.Callable callable,
|
||||||
@NotNull NameResolver nameResolver,
|
@NotNull NameResolver nameResolver,
|
||||||
|
@NotNull AnnotatedCallableKind kind,
|
||||||
@NotNull ProtoBuf.Callable.ValueParameter proto
|
@NotNull ProtoBuf.Callable.ValueParameter proto
|
||||||
) {
|
) {
|
||||||
// Kind = FUNCTION because properties and getters don't have any value parameters, and property setters are not supported yet
|
MemberSignature methodSignature = getCallableSignature(callable, nameResolver, kind);
|
||||||
// TODO: support annotations on property setter value parameters
|
|
||||||
MemberSignature methodSignature = getCallableSignature(callable, nameResolver, AnnotatedCallableKind.FUNCTION);
|
|
||||||
if (methodSignature != null) {
|
if (methodSignature != null) {
|
||||||
if (proto.hasExtension(JavaProtoBuf.index)) {
|
if (proto.hasExtension(JavaProtoBuf.index)) {
|
||||||
MemberSignature paramSignature =
|
MemberSignature paramSignature =
|
||||||
MemberSignature.fromMethodSignatureAndParameterIndex(methodSignature, proto.getExtension(JavaProtoBuf.index));
|
MemberSignature.fromMethodSignatureAndParameterIndex(methodSignature, proto.getExtension(JavaProtoBuf.index));
|
||||||
return findClassAndLoadMemberAnnotations(container, callable, nameResolver, AnnotatedCallableKind.FUNCTION, paramSignature);
|
return findClassAndLoadMemberAnnotations(container, callable, nameResolver, kind, paramSignature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user