aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoracolyer <acolyer>2003-02-26 16:19:14 +0000
committeracolyer <acolyer>2003-02-26 16:19:14 +0000
commitaa7e7a63ee3ac1ab1c3cab155539231aa0e42260 (patch)
tree0fe17bac83d0df4dedb4fefc920b663a20bd3d35 /asm
parent1da530069c8b755a7310e83dd05e5ba753d2085c (diff)
downloadaspectj-aa7e7a63ee3ac1ab1c3cab155539231aa0e42260.tar.gz
aspectj-aa7e7a63ee3ac1ab1c3cab155539231aa0e42260.zip
Improved formatting of toString for LinkNodes
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/LinkNode.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/asm/src/org/aspectj/asm/LinkNode.java b/asm/src/org/aspectj/asm/LinkNode.java
index 72f02cb1b..5f43f0426 100644
--- a/asm/src/org/aspectj/asm/LinkNode.java
+++ b/asm/src/org/aspectj/asm/LinkNode.java
@@ -44,11 +44,22 @@ public class LinkNode extends StructureNode {
if (programElementNode.getProgramElementKind().equals(ProgramElementNode.Kind.ADVICE) ||
programElementNode.getProgramElementKind().equals(ProgramElementNode.Kind.INTRODUCTION) ||
programElementNode.getProgramElementKind().equals(ProgramElementNode.Kind.CODE)) {
- return programElementNode.parent.toString() + ": " + programElementNode.getName();
+ name = programElementNode.parent.toString() + ": " + programElementNode.getName();
+ StructureNode grandparent = programElementNode.parent.parent;
+ if ( grandparent instanceof ProgramElementNode ) {
+ ProgramElementNode pe_grandparent = (ProgramElementNode)grandparent;
+ if ( pe_grandparent.getProgramElementKind().equals(ProgramElementNode.Kind.CLASS) ||
+ pe_grandparent.getProgramElementKind().equals(ProgramElementNode.Kind.INTERFACE)
+ ) {
+ name = pe_grandparent.toString() + "." + name;
+ }
+ }
+
} else if (programElementNode.isMemberKind()) {
- return programElementNode.parent.toString() + '.' + programElementNode.getName();
+ name = programElementNode.parent.toString() + '.' + programElementNode.getName();
} else {
- return programElementNode.toString();
+ name = programElementNode.toString();
}
+ return name;
}
}