summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-07-27 11:47:51 +0000
committeraclement <aclement>2005-07-27 11:47:51 +0000
commitc349e6632c9af0664f00783ff44e7e023cfa7d7b (patch)
treea6d2e42801240aee2ca12699f60c0ca596f2a559 /org.aspectj.ajdt.core
parente51f3dcc81862c99490ded005197ccedec40c5a0 (diff)
downloadaspectj-c349e6632c9af0664f00783ff44e7e023cfa7d7b.tar.gz
aspectj-c349e6632c9af0664f00783ff44e7e023cfa7d7b.zip
genericmethoditd: uses different ctor so tvariables arent lost
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java28
1 files changed, 23 insertions, 5 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java
index ab270411e..fed5d0b3b 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java
@@ -25,10 +25,22 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+/**
+ * A special method binding representing an ITD that pretends to be a
+ * member in some target type for matching purposes.
+ */
public class InterTypeMethodBinding extends MethodBinding {
+
+ /** The target type upon which the ITD is declared */
private ReferenceBinding targetType;
+
+ /**
+ * This is the 'pretend' method that should be the target of any attempt
+ * to call the ITD'd method.
+ */
private MethodBinding syntheticMethod;
+
public MethodBinding postDispatchMethod;
public AbstractMethodDeclaration sourceMethod;
@@ -36,11 +48,17 @@ public class InterTypeMethodBinding extends MethodBinding {
public InterTypeMethodBinding(EclipseFactory world, ResolvedMember signature, UnresolvedType withinType,
AbstractMethodDeclaration sourceMethod)
{
- super(world.makeMethodBinding(signature), null);
- this.sourceMethod = sourceMethod;
-
- targetType = (ReferenceBinding)world.makeTypeBinding(signature.getDeclaringType());
- this.declaringClass = (ReferenceBinding)world.makeTypeBinding(withinType);
+ super();
+ MethodBinding mb = world.makeMethodBinding(signature);
+ this.modifiers = mb.modifiers;
+ this.selector = mb.selector;
+ this.returnType = mb.returnType;
+ this.parameters = mb.parameters;
+ this.thrownExceptions = mb.thrownExceptions;
+ this.typeVariables = mb.typeVariables;
+ this.sourceMethod = sourceMethod;
+ this.targetType = (ReferenceBinding)world.makeTypeBinding(signature.getDeclaringType());
+ this.declaringClass = (ReferenceBinding)world.makeTypeBinding(withinType);
if (signature.getKind() == Member.METHOD) {
syntheticMethod =