From 4289ce7c6751b61554fb2c45a893f93f26676ed3 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 19 Nov 2009 21:01:41 +0000 Subject: [PATCH] simplifying ResolvedMember interface --- .../ast/InterTypeConstructorDeclaration.java | 4 ++-- .../compiler/ast/InterTypeMethodDeclaration.java | 3 ++- .../internal/compiler/lookup/EclipseFactory.java | 12 ++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java index bcc22be25..cc569c1c4 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java @@ -175,7 +175,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration { // Use the factory to build a semi-correct resolvedmember - then patch it up with // reset calls. This is SAFE - ResolvedMember preIntroducedConstructorRM = world.makeResolvedMember(binding); + ResolvedMemberImpl preIntroducedConstructorRM = world.makeResolvedMember(binding); preIntroducedConstructorRM.resetName(NameMangler.preIntroducedConstructor(aspectTypeX, targetTypeX)); preIntroducedConstructorRM.resetModifiers(Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL); preIntroducedConstructorRM.resetReturnTypeToObjectArray(); @@ -290,7 +290,7 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration { return null; // We encountered a problem building the scope, don't continue - error already reported // This signature represents what we want consumers of the targetted type to 'see' - ResolvedMember signature = world.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases()); + ResolvedMemberImpl signature = world.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases()); signature.resetKind(Member.CONSTRUCTOR); signature.resetName(""); int resetModifiers = declaredModifiers; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java index f6c89b127..0cf8dabe1 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java @@ -42,6 +42,7 @@ import org.aspectj.weaver.Constants; import org.aspectj.weaver.NameMangler; import org.aspectj.weaver.NewMethodTypeMunger; import org.aspectj.weaver.ResolvedMember; +import org.aspectj.weaver.ResolvedMemberImpl; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.Shadow; import org.aspectj.weaver.UnresolvedType; @@ -199,7 +200,7 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration { // This signature represents what we want consumers of the targetted type to 'see' // must use the factory method to build it since there may be typevariables from the binding // referred to in the parameters/returntype - ResolvedMember sig = factory.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases()); + ResolvedMemberImpl sig = factory.makeResolvedMemberForITD(binding, onTypeBinding, interTypeScope.getRecoveryAliases()); sig.resetName(new String(declaredSelector)); int resetModifiers = declaredModifiers; if (binding.isVarargs()) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index a8aead806..09ce09067 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -468,11 +468,11 @@ public class EclipseFactory { return finishedTypeMungers; } - public ResolvedMember makeResolvedMember(MethodBinding binding) { + public ResolvedMemberImpl makeResolvedMember(MethodBinding binding) { return makeResolvedMember(binding, binding.declaringClass); } - public ResolvedMember makeResolvedMember(MethodBinding binding, Shadow.Kind shadowKind) { + public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, Shadow.Kind shadowKind) { MemberKind memberKind = binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD; if (shadowKind == Shadow.AdviceExecution) { memberKind = Member.ADVICE; @@ -499,11 +499,11 @@ public class EclipseFactory { * typevariables whilst the compiler was resolving types - this only happens if it is a generic itd that shares type variables * with its target type. */ - public ResolvedMember makeResolvedMemberForITD(MethodBinding binding, TypeBinding declaringType, Map /* + public ResolvedMemberImpl makeResolvedMemberForITD(MethodBinding binding, TypeBinding declaringType, Map /* * TypeVariableBinding > * original alias name */recoveryAliases) { - ResolvedMember result = null; + ResolvedMemberImpl result = null; try { typeVariablesForAliasRecovery = recoveryAliases; result = makeResolvedMember(binding, declaringType); @@ -513,11 +513,11 @@ public class EclipseFactory { return result; } - public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType) { + public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, TypeBinding declaringType) { return makeResolvedMember(binding, declaringType, binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD); } - public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType, MemberKind memberKind) { + public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, TypeBinding declaringType, MemberKind memberKind) { // System.err.println("member for: " + binding + ", " + new String(binding.declaringClass.sourceName)); // Convert the type variables and store them -- 2.39.5