aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2009-07-17 21:29:55 +0000
committeraclement <aclement>2009-07-17 21:29:55 +0000
commit75cab96794087e91322e8a575ce7c628f95fb3ca (patch)
treefc77d2eff4281bcc9e09e117b5c61bf2219e47e0 /asm
parentf65e345ba3f12fa76a5aa7d608042dd5ee900fac (diff)
downloadaspectj-75cab96794087e91322e8a575ce7c628f95fb3ca.tar.gz
aspectj-75cab96794087e91322e8a575ce7c628f95fb3ca.zip
283657: fix
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java28
1 files changed, 27 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index 1772fbf19..074ab9321 100644
--- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -158,7 +158,33 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
// TODO could optimize this code
char[] byteCodeName = ipe.getBytecodeName().toCharArray();
- if (ipe.getKind().isDeclareAnnotation()) {
+ if (ipe.getKind().isInterTypeMember()) {
+ int count = 1;
+ List kids = ipe.getParent().getChildren();
+ int idx = 0;
+ for (Iterator iterator = kids.iterator(); iterator.hasNext();) {
+ IProgramElement object = (IProgramElement) iterator.next();
+ if (object.equals(ipe)) {
+ break;
+ }
+ if (object.getKind().isInterTypeMember()) {
+ if (object.getName().equals(ipe.getName()) && getParameters(object).equals(getParameters(ipe))) {
+ String existingHandle = object.getHandleIdentifier();
+ int suffixPosition = existingHandle.indexOf('!');
+ if (suffixPosition != -1) {
+ count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+ } else {
+ if (count == 1) {
+ count = 2;
+ }
+ }
+ }
+ }
+ }
+ if (count > 1) {
+ return CharOperation.concat(countDelim, new Integer(count).toString().toCharArray());
+ }
+ } else if (ipe.getKind().isDeclareAnnotation()) {
// look at peer declares
int count = 1;
List kids = ipe.getParent().getChildren();