summaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/IRelationship.java2
-rw-r--r--asm/src/org/aspectj/asm/internal/Relationship.java15
2 files changed, 17 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/IRelationship.java b/asm/src/org/aspectj/asm/IRelationship.java
index 7d901e0a9..508ce4892 100644
--- a/asm/src/org/aspectj/asm/IRelationship.java
+++ b/asm/src/org/aspectj/asm/IRelationship.java
@@ -83,4 +83,6 @@ public interface IRelationship extends Serializable {
return ALL[ordinal];
}
}
+
+ public boolean isAffects();
}
diff --git a/asm/src/org/aspectj/asm/internal/Relationship.java b/asm/src/org/aspectj/asm/internal/Relationship.java
index 6cef5f3e7..e057d5057 100644
--- a/asm/src/org/aspectj/asm/internal/Relationship.java
+++ b/asm/src/org/aspectj/asm/internal/Relationship.java
@@ -76,5 +76,20 @@ public class Relationship implements IRelationship {
public boolean hasRuntimeTest() {
return hasRuntimeTest;
}
+
+ // For repairing the relationship map on incremental builds, we need
+ // to know the direction of the relationship: either 'affects' or 'affected by'
+ // this set are considered the 'affects' relationship. If we know which direction
+ // it is in, we know which ones should be removed when a particular resource
+ // is modified because the subsequent reweave will re-add it.
+ public boolean isAffects() {
+ // TODO should be a well defined set (enum type) with a flag for this...
+ return name.equals("advises") ||
+ name.equals("declares on") ||
+ name.equals("softens") ||
+ name.equals("matched by") ||
+ name.equals("declared on") ||
+ name.equals("annotates");
+ }
}