aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-26 16:51:51 +0000
committeraclement <aclement>2005-10-26 16:51:51 +0000
commit005268b02fa838a0f880252ade50976af35a7d43 (patch)
treeb125e7f1b0c098e10292eedc5555cb065a9aa840 /org.aspectj.ajdt.core
parentf07508934e02405e2645d99bd094a61d90cf2bea (diff)
downloadaspectj-005268b02fa838a0f880252ade50976af35a7d43.tar.gz
aspectj-005268b02fa838a0f880252ade50976af35a7d43.zip
see pr112105 comment #13: more helpers, for itd support.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java18
1 files changed, 16 insertions, 2 deletions
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 ba7926a86..48713779d 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
@@ -715,12 +715,25 @@ public class EclipseFactory {
}
/**
+ * Creates a method binding for a resolvedmember taking into account type variable aliases -
+ * this variant can take an aliasTargetType and should be used when the alias target type
+ * cannot be retrieved from the resolvedmember.
+ */
+ public MethodBinding makeMethodBinding(ResolvedMember member,List aliases,UnresolvedType aliasTargetType) {
+ return internalMakeMethodBinding(member,aliases,aliasTargetType);
+ }
+
+ /**
* Convert a resolvedmember into an eclipse method binding.
*/
public MethodBinding makeMethodBinding(ResolvedMember member) {
return internalMakeMethodBinding(member,null); // there are no aliases
}
+ public MethodBinding internalMakeMethodBinding(ResolvedMember member,List aliases) {
+ return internalMakeMethodBinding(member,aliases,member.getDeclaringType());
+ }
+
/**
* Take a normal AJ member and convert it into an eclipse methodBinding.
* Taking into account any aliases that it may include due to being a
@@ -728,7 +741,7 @@ public class EclipseFactory {
* map so that they will be substituted as appropriate in the returned
* methodbinding
*/
- public MethodBinding internalMakeMethodBinding(ResolvedMember member,List aliases) {
+ public MethodBinding internalMakeMethodBinding(ResolvedMember member,List aliases,UnresolvedType aliasTargetType) {
typeVariableToTypeBinding.clear();
TypeVariableBinding[] tvbs = null;
@@ -746,9 +759,10 @@ public class EclipseFactory {
// If there are aliases, place them in the map
if (aliases!=null && aliases.size()!=0) {
int i=0;
+ ReferenceBinding aliasTarget = (ReferenceBinding)makeTypeBinding(aliasTargetType);
for (Iterator iter = aliases.iterator(); iter.hasNext();) {
String element = (String) iter.next();
- typeVariableToTypeBinding.put(element,declaringType.typeVariables()[i++]);
+ typeVariableToTypeBinding.put(element,aliasTarget.typeVariables()[i++]);
}
}