]> source.dussan.org Git - aspectj.git/commitdiff
see pr112105 comment #13: these now use the aliases correctly.
authoraclement <aclement>
Wed, 26 Oct 2005 16:46:18 +0000 (16:46 +0000)
committeraclement <aclement>
Wed, 26 Oct 2005 16:46:18 +0000 (16:46 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java

index ec9ff1fb5d31b3cc7f31e7b0b75567b06fbf505f..6d473e7fe67c4ac1ee7480f0551c6781322f9a0d 100644 (file)
@@ -128,7 +128,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
                        };
                } else if (!onTypeBinding.isInterface()) {
                        MethodBinding writeMethod = world.makeMethodBinding(
-                                       AjcMemberMaker.interFieldSetDispatcher(sig,aspectType));
+                                       AjcMemberMaker.interFieldSetDispatcher(sig,aspectType),munger.getTypeVariableAliases());
                        // For the body of an intertype field initalizer, generate a call to the inter field set dispatcher
                        // method as that casts the shadow of a field set join point.
                        if (Modifier.isStatic(declaredModifiers)) {
@@ -147,7 +147,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
                } else {
                        //XXX something is broken about this logic.  Can we write to static interface fields?
                        MethodBinding writeMethod = world.makeMethodBinding(
-                               AjcMemberMaker.interFieldInterfaceSetter(sig, sig.getDeclaringType().resolve(world.getWorld()), aspectType));
+                               AjcMemberMaker.interFieldInterfaceSetter(sig, sig.getDeclaringType().resolve(world.getWorld()), aspectType),munger.getTypeVariableAliases());
                        if (Modifier.isStatic(declaredModifiers)) {
                                this.statements = new Statement[] {
                                        new KnownMessageSend(writeMethod, 
@@ -250,9 +250,9 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
        {
                MethodBinding binding;
                if (isGetter) {
-                       binding = world.makeMethodBinding(AjcMemberMaker.interFieldGetDispatcher(sig, aspectType));
+                       binding = world.makeMethodBinding(AjcMemberMaker.interFieldGetDispatcher(sig, aspectType),munger.getTypeVariableAliases(),munger.getSignature().getDeclaringType());
                } else {
-                       binding = world.makeMethodBinding(AjcMemberMaker.interFieldSetDispatcher(sig, aspectType));
+                       binding = world.makeMethodBinding(AjcMemberMaker.interFieldSetDispatcher(sig, aspectType),munger.getTypeVariableAliases(),munger.getSignature().getDeclaringType());
                }
                classFile.generateMethodInfoHeader(binding);
                int methodAttributeOffset = classFile.contentsOffset;
@@ -264,7 +264,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
                codeStream.reset(this, classFile);
                
                FieldBinding classField = world.makeFieldBinding(
-                       AjcMemberMaker.interFieldClassField(sig, aspectType));
+                       AjcMemberMaker.interFieldClassField(sig, aspectType),munger.getTypeVariableAliases());
                
                codeStream.initializeMaxLocals(binding);
                if (isGetter) {
@@ -273,7 +273,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
                 ResolvedType declaringRTX = world.getWorld().resolve(declaringTX,munger.getSourceLocation());
                                MethodBinding readMethod = world.makeMethodBinding(
                                        AjcMemberMaker.interFieldInterfaceGetter(
-                                               sig, declaringRTX, aspectType));
+                                               sig, declaringRTX, aspectType),munger.getTypeVariableAliases());
                                generateInterfaceReadBody(binding, readMethod, codeStream);
                        } else {
                                generateClassReadBody(binding, classField, codeStream);
@@ -282,7 +282,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
                        if (onTypeBinding.isInterface()) {
                                MethodBinding writeMethod = world.makeMethodBinding(
                                        AjcMemberMaker.interFieldInterfaceSetter(
-                                               sig, world.getWorld().resolve(sig.getDeclaringType(),munger.getSourceLocation()), aspectType));
+                                               sig, world.getWorld().resolve(sig.getDeclaringType(),munger.getSourceLocation()), aspectType),munger.getTypeVariableAliases());
                                generateInterfaceWriteBody(binding, writeMethod, codeStream);
                        } else {
                                generateClassWriteBody(binding, classField, codeStream);
index a814fe74f60448cf173757c4a3735e388141d813..cf2da9f101bcb5a284167bc83edad0c155caa1d3 100644 (file)
@@ -126,7 +126,7 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
                                
                                // Work out the real method binding that we can use for comparison
                                EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope);
-                               MethodBinding realthing = world.makeMethodBinding(munger.getSignature());
+                               MethodBinding realthing = world.makeMethodBinding(munger.getSignature(),munger.getTypeVariableAliases());
                                
                                boolean reportError = true;                             
                                // Go up the hierarchy, looking for something we override
@@ -197,7 +197,6 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
                ResolvedMember me =
                        myMunger.getInterMethodBody(aspectType);
                this.selector = binding.selector = me.getName().toCharArray();
-               
                return new EclipseTypeMunger(factory, myMunger, aspectType, this);
        }
        
@@ -231,9 +230,9 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
                
                ResolvedMember dispatchMember = 
                        AjcMemberMaker.interMethodDispatcher(signature, aspectType);
-               MethodBinding dispatchBinding = world.makeMethodBinding(dispatchMember);
+               MethodBinding dispatchBinding = world.makeMethodBinding(dispatchMember,munger.getTypeVariableAliases(),munger.getSignature().getDeclaringType());
                MethodBinding introducedMethod = 
-                       world.makeMethodBinding(AjcMemberMaker.interMethod(signature, aspectType, onTypeBinding.isInterface()));
+                       world.makeMethodBinding(AjcMemberMaker.interMethod(signature, aspectType, onTypeBinding.isInterface()),munger.getTypeVariableAliases());
                
                classFile.generateMethodInfoHeader(dispatchBinding);
                int methodAttributeOffset = classFile.contentsOffset;