diff options
author | mkersten <mkersten> | 2003-08-08 14:59:46 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-08-08 14:59:46 +0000 |
commit | f7944d2c68e8561e12498c006729c6c341b657f7 (patch) | |
tree | 205af60b87fa308248a3d01694a9685a53260fe8 /weaver | |
parent | 555d9cd8fec8a2c0bc3daac63123a9bea941a912 (diff) | |
download | aspectj-f7944d2c68e8561e12498c006729c6c341b657f7.tar.gz aspectj-f7944d2c68e8561e12498c006729c6c341b657f7.zip |
First pass at new relationship API support.
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/AsmAdaptor.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/weaver/src/org/aspectj/weaver/AsmAdaptor.java b/weaver/src/org/aspectj/weaver/AsmAdaptor.java index 8b557cf33..e448896a4 100644 --- a/weaver/src/org/aspectj/weaver/AsmAdaptor.java +++ b/weaver/src/org/aspectj/weaver/AsmAdaptor.java @@ -20,20 +20,29 @@ import org.aspectj.asm.internal.*; import org.aspectj.bridge.*; public class AsmAdaptor { - public static void noteMunger(StructureModel model, Shadow shadow, ShadowMunger munger) { + + public static void nodeMunger(StructureModel model, Shadow shadow, ShadowMunger munger) { if (munger instanceof Advice) { Advice a = (Advice)munger; - if (a.getKind().isPerEntry() || a.getKind().isCflow()) { +// if (a.getKind().isPerEntry() || a.getKind().isCflow()) { // ??? might want to show these in the future - return; - } +// return; +// } // System.out.println("--------------------------"); IProgramElement targetNode = getNode(model, shadow); IProgramElement adviceNode = getNode(model, a); + if (adviceNode != null && targetNode != null) { +// mapper.putRelationshipForElement( +// adviceNode, +// ADVICE, +// targetNode); + } + +// System.out.println("> target: " + targetNode + ", advice: " + adviceNode); // throw new RuntimeException("unimplemented"); - IRelationship relation = null; +// IRelationship relation = new Relationship(); // if (shadow.getKind().equals(Shadow.FieldGet) || shadow.getKind().equals(Shadow.FieldSet)) { // relation = AdviceAssociation.FIELD_ACCESS_RELATION; // } else if (shadow.getKind().equals(Shadow.Initialization) || shadow.getKind().equals(Shadow.StaticInitialization)) { @@ -55,9 +64,7 @@ public class AsmAdaptor { // System.err.println("> unmatched relation: " + shadow.getKind()); // relation = AdviceAssociation.METHOD_RELATION; // } -// -// System.out.println("> target: " + targetNode + ", advice: " + adviceNode); - createAppropriateLinks(targetNode, adviceNode, relation); +// createAppropriateLinks(targetNode, adviceNode, relation); } } @@ -189,8 +196,4 @@ public class AsmAdaptor { // if we can't find the member, we'll just put it in the class return classNode; } - - - - } |