aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authormkersten <mkersten>2003-08-13 20:51:10 +0000
committermkersten <mkersten>2003-08-13 20:51:10 +0000
commitbffcd4c30591bce89ba938325159374e1ea1ea96 (patch)
tree29f2247cf0806c7e5ea7e419c33d86b6a3738b38 /weaver
parent11d7649fc3219af5a71d3bf0b9fe004c075c2b4f (diff)
downloadaspectj-bffcd4c30591bce89ba938325159374e1ea1ea96.tar.gz
aspectj-bffcd4c30591bce89ba938325159374e1ea1ea96.zip
Added support for multiple relationships for a single program element. Renamed model container class.
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/AsmAdapter.java14
-rw-r--r--weaver/src/org/aspectj/weaver/World.java8
2 files changed, 11 insertions, 11 deletions
diff --git a/weaver/src/org/aspectj/weaver/AsmAdapter.java b/weaver/src/org/aspectj/weaver/AsmAdapter.java
index 2c4188db6..5c121b169 100644
--- a/weaver/src/org/aspectj/weaver/AsmAdapter.java
+++ b/weaver/src/org/aspectj/weaver/AsmAdapter.java
@@ -26,11 +26,11 @@ public class AsmAdapter {
public static final String DECLARES_ON = "declares on";
public static final String DECLAREDY_BY = "declared by";
- public static void checkerMunger(StructureModel model, Shadow shadow) {
+ public static void checkerMunger(AspectJModel model, Shadow shadow) {
// System.err.println("> " + shadow.getThisVar() + " to " + shadow.getTargetVar());
}
- public static void nodeMunger(StructureModel model, Shadow shadow, ShadowMunger munger) {
+ public static void nodeMunger(AspectJModel model, Shadow shadow, ShadowMunger munger) {
if (munger instanceof Advice) {
Advice a = (Advice)munger;
if (a.getKind().isPerEntry() || a.getKind().isCflow()) {
@@ -43,7 +43,7 @@ public class AsmAdapter {
IProgramElement adviceNode = getNode(model, a);
if (adviceNode != null && targetNode != null) {
- IRelationship foreward = mapper.get(adviceNode);
+ IRelationship foreward = mapper.get(adviceNode, IRelationship.Kind.ADVICE, ADVISES);
if (foreward == null) {
foreward = new Relationship(
ADVISES,
@@ -55,7 +55,7 @@ public class AsmAdapter {
}
foreward.getTargets().add(targetNode);
- IRelationship back = mapper.get(targetNode);
+ IRelationship back = mapper.get(targetNode, IRelationship.Kind.ADVICE, ADVISED_BY);
if (back == null) {
back = new Relationship(
ADVISED_BY,
@@ -70,14 +70,14 @@ public class AsmAdapter {
}
}
- private static IProgramElement getNode(StructureModel model, Advice a) {
+ private static IProgramElement getNode(AspectJModel model, Advice a) {
//ResolvedTypeX inAspect = a.getConcreteAspect();
Member member = a.getSignature();
if (a.getSignature() == null) return null;
return lookupMember(model, member);
}
- private static IProgramElement getNode(StructureModel model, Shadow shadow) {
+ private static IProgramElement getNode(AspectJModel model, Shadow shadow) {
Member enclosingMember = shadow.getEnclosingCodeSignature();
IProgramElement enclosingNode = lookupMember(model, enclosingMember);
@@ -130,7 +130,7 @@ public class AsmAdapter {
return peNode;
}
- public static IProgramElement lookupMember(StructureModel model, Member member) {
+ public static IProgramElement lookupMember(AspectJModel model, Member member) {
TypeX declaringType = member.getDeclaringType();
IProgramElement classNode =
model.findNodeForType(declaringType.getPackageName(), declaringType.getClassName());
diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java
index 792201dd0..9f2285e23 100644
--- a/weaver/src/org/aspectj/weaver/World.java
+++ b/weaver/src/org/aspectj/weaver/World.java
@@ -19,7 +19,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import org.aspectj.asm.StructureModel;
+import org.aspectj.asm.AspectJModel;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.Message;
@@ -36,7 +36,7 @@ public abstract class World {
protected CrosscuttingMembersSet crosscuttingMembersSet = new CrosscuttingMembersSet(this);
- protected StructureModel model = null;
+ protected AspectJModel model = null;
protected Lint lint = new Lint(this);
@@ -340,11 +340,11 @@ public abstract class World {
return crosscuttingMembersSet;
}
- public StructureModel getModel() {
+ public AspectJModel getModel() {
return model;
}
- public void setModel(StructureModel model) {
+ public void setModel(AspectJModel model) {
this.model = model;
}