summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-11-22 09:28:09 +0000
committeracolyer <acolyer>2005-11-22 09:28:09 +0000
commit554e73397c0b80ce32e56cf3adeb6921783e005d (patch)
tree8bfd42ffa88ab47a7787aedb5428ce12965cc9ff /org.aspectj.ajdt.core
parent735d94f91a02e08bf5a1a86185b9318de4bd4319 (diff)
downloadaspectj-554e73397c0b80ce32e56cf3adeb6921783e005d.tar.gz
aspectj-554e73397c0b80ce32e56cf3adeb6921783e005d.zip
tests and fix for pr103051 :- declare soft and adviceexecution
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java15
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java5
2 files changed, 16 insertions, 4 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 94a12aaca..92e37675b 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
@@ -448,6 +448,12 @@ public class EclipseFactory {
public ResolvedMember makeResolvedMember(MethodBinding binding) {
return makeResolvedMember(binding, binding.declaringClass);
}
+
+ public ResolvedMember makeResolvedMember(MethodBinding binding, Shadow.Kind shadowKind) {
+ Member.Kind memberKind = binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD;
+ if (shadowKind == Shadow.AdviceExecution) memberKind = Member.ADVICE;
+ return makeResolvedMember(binding,binding.declaringClass,memberKind);
+ }
/**
* Conversion from a methodbinding (eclipse) to a resolvedmember (aspectj) is now done
@@ -481,8 +487,13 @@ public class EclipseFactory {
}
return result;
}
-
+
public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType) {
+ return makeResolvedMember(binding,declaringType,
+ binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD);
+ }
+
+ public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType, Member.Kind memberKind) {
//System.err.println("member for: " + binding + ", " + new String(binding.declaringClass.sourceName));
// Convert the type variables and store them
@@ -501,7 +512,7 @@ public class EclipseFactory {
ResolvedType realDeclaringType = world.resolve(fromBinding(declaringType));
if (realDeclaringType.isRawType()) realDeclaringType = realDeclaringType.getGenericType();
ResolvedMemberImpl ret = new ResolvedMemberImpl(
- binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD,
+ memberKind,
realDeclaringType,
binding.modifiers,
fromBinding(binding.returnType),
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java
index 4bb3a5829..88e765040 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java
@@ -166,8 +166,9 @@ public class EclipseShadow extends Shadow {
return null;
//throw new RuntimeException("unimplemented: " + e);
}
- return new EclipseShadow(world, kind,
- world.makeResolvedMember(e.binding), astNode, context);
+ return
+ new EclipseShadow(world, kind,
+ world.makeResolvedMember(e.binding,kind), astNode, context);
} else if (astNode instanceof TypeDeclaration) {
return new EclipseShadow(world, Shadow.StaticInitialization,
new MemberImpl(Member.STATIC_INITIALIZATION,