diff options
author | aclement <aclement> | 2011-04-28 20:00:30 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-04-28 20:00:30 +0000 |
commit | ef6ced1071b44dd3f6cb3eb784f2925958d8ab42 (patch) | |
tree | 1e6f43797ecd05690d89b586e7bd10cc180a2934 /asm | |
parent | de4cb627334096469737f8c97dfcb3984cb88bb3 (diff) | |
download | aspectj-ef6ced1071b44dd3f6cb3eb784f2925958d8ab42.tar.gz aspectj-ef6ced1071b44dd3f6cb3eb784f2925958d8ab42.zip |
328121
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index d95fb5fbf..6019964c6 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -158,7 +158,7 @@ public class AspectJElementHierarchy implements IHierarchy { synchronized (this) { // Build a cache key and check the cache - StringBuffer keyb = (packageName == null) ? new StringBuffer() : new StringBuffer(packageName); + StringBuilder keyb = (packageName == null) ? new StringBuilder() : new StringBuilder(packageName); keyb.append(".").append(typeName); String key = keyb.toString(); IProgramElement cachedValue = typeMap.get(key); @@ -290,6 +290,15 @@ public class AspectJElementHierarchy implements IHierarchy { } for (IProgramElement classNode : nodes) { + if (!classNode.getKind().isType()) { + List<IProgramElement> kids = classNode.getChildren(); + if (kids != null && !kids.isEmpty()) { + IProgramElement node = findClassInNodes(kids, name, typeName); + if (node != null) { + return node; + } + } + } else { if (baseName.equals(classNode.getName())) { if (innerName == null) { return classNode; @@ -306,6 +315,7 @@ public class AspectJElementHierarchy implements IHierarchy { return node; } } + } } return null; } |