]> source.dussan.org Git - aspectj.git/commitdiff
genericmethoditd: uses different ctor so tvariables arent lost
authoraclement <aclement>
Wed, 27 Jul 2005 11:47:51 +0000 (11:47 +0000)
committeraclement <aclement>
Wed, 27 Jul 2005 11:47:51 +0000 (11:47 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java

index ab270411e835cd0bfcd8c8491a655b20cb688735..fed5d0b3ba0c0da4f82ee692b451887aa7ea2cb7 100644 (file)
@@ -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 =