Get rid of SAM_ADAPTER_FUNCTION_TO_ORIGINAL

Use SAM adapters hierarchy instead
This commit is contained in:
Alexander Udalov
2013-08-05 19:29:01 +04:00
parent f76942fd19
commit 4a620dfcbb
12 changed files with 142 additions and 81 deletions
@@ -30,29 +30,13 @@ public class SimpleFunctionDescriptorImpl extends FunctionDescriptorImpl impleme
private boolean isInline = false;
private final SimpleFunctionDescriptor originalOfSynthesized; // TODO replace with user data
public SimpleFunctionDescriptorImpl(
@NotNull DeclarationDescriptor containingDeclaration,
@NotNull List<AnnotationDescriptor> annotations,
@NotNull Name name,
@NotNull Kind kind
) {
this(containingDeclaration, annotations, name, kind, null);
}
public SimpleFunctionDescriptorImpl(
@NotNull DeclarationDescriptor containingDeclaration,
@NotNull List<AnnotationDescriptor> annotations,
@NotNull Name name,
@NotNull Kind kind,
@Nullable SimpleFunctionDescriptor originalOfSynthesized
) {
super(containingDeclaration, annotations, name, kind);
this.originalOfSynthesized = originalOfSynthesized;
if (originalOfSynthesized != null) {
assert kind == Kind.SYNTHESIZED;
}
}
private SimpleFunctionDescriptorImpl(
@@ -62,7 +46,6 @@ public class SimpleFunctionDescriptorImpl extends FunctionDescriptorImpl impleme
@NotNull Name name,
@NotNull Kind kind) {
super(containingDeclaration, original, annotations, name, kind);
originalOfSynthesized = null;
}
public SimpleFunctionDescriptorImpl initialize(
@@ -118,10 +101,4 @@ public class SimpleFunctionDescriptorImpl extends FunctionDescriptorImpl impleme
public boolean isInline() {
return isInline;
}
// TODO replace with user data
@Nullable
public SimpleFunctionDescriptor getOriginalOfSynthesized() {
return originalOfSynthesized;
}
}