getOriginal() for PropertyDescriptor
This commit is contained in:
@@ -18,10 +18,12 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member
|
|||||||
private final boolean isVar;
|
private final boolean isVar;
|
||||||
private final JetType receiverType;
|
private final JetType receiverType;
|
||||||
private final List<TypeParameterDescriptor> typeParemeters = Lists.newArrayListWithCapacity(0);
|
private final List<TypeParameterDescriptor> typeParemeters = Lists.newArrayListWithCapacity(0);
|
||||||
|
private final PropertyDescriptor original;
|
||||||
private PropertyGetterDescriptor getter;
|
private PropertyGetterDescriptor getter;
|
||||||
private PropertySetterDescriptor setter;
|
private PropertySetterDescriptor setter;
|
||||||
|
|
||||||
public PropertyDescriptor(
|
private PropertyDescriptor(
|
||||||
|
@Nullable PropertyDescriptor original,
|
||||||
@NotNull DeclarationDescriptor containingDeclaration,
|
@NotNull DeclarationDescriptor containingDeclaration,
|
||||||
@NotNull List<Annotation> annotations,
|
@NotNull List<Annotation> annotations,
|
||||||
@NotNull MemberModifiers memberModifiers,
|
@NotNull MemberModifiers memberModifiers,
|
||||||
@@ -36,6 +38,19 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member
|
|||||||
this.isVar = isVar;
|
this.isVar = isVar;
|
||||||
this.memberModifiers = memberModifiers;
|
this.memberModifiers = memberModifiers;
|
||||||
this.receiverType = receiverType;
|
this.receiverType = receiverType;
|
||||||
|
this.original = original == null ? this : original;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PropertyDescriptor(
|
||||||
|
@NotNull DeclarationDescriptor containingDeclaration,
|
||||||
|
@NotNull List<Annotation> annotations,
|
||||||
|
@NotNull MemberModifiers memberModifiers,
|
||||||
|
boolean isVar,
|
||||||
|
@Nullable JetType receiverType,
|
||||||
|
@NotNull String name,
|
||||||
|
@Nullable JetType inType,
|
||||||
|
@NotNull JetType outType) {
|
||||||
|
this(null, containingDeclaration, annotations, memberModifiers, isVar, receiverType, name, inType, outType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PropertyDescriptor(
|
private PropertyDescriptor(
|
||||||
@@ -44,6 +59,7 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member
|
|||||||
@Nullable JetType inType,
|
@Nullable JetType inType,
|
||||||
@NotNull JetType outType) {
|
@NotNull JetType outType) {
|
||||||
this(
|
this(
|
||||||
|
original,
|
||||||
original.getContainingDeclaration(),
|
original.getContainingDeclaration(),
|
||||||
original.getAnnotations(), // TODO : substitute?
|
original.getAnnotations(), // TODO : substitute?
|
||||||
original.getModifiers(),
|
original.getModifiers(),
|
||||||
@@ -114,4 +130,10 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member
|
|||||||
public <R, D> R accept(DeclarationDescriptorVisitor<R, D> visitor, D data) {
|
public <R, D> R accept(DeclarationDescriptorVisitor<R, D> visitor, D data) {
|
||||||
return visitor.visitPropertyDescriptor(this, data);
|
return visitor.visitPropertyDescriptor(this, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public PropertyDescriptor getOriginal() {
|
||||||
|
return original;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user