diff options
author | aclement <aclement> | 2006-05-11 07:27:45 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-11 07:27:45 +0000 |
commit | 923c2265e677b997c3ad80d48dc78004a1313ff9 (patch) | |
tree | 98c889c2620e568b97b8c2ebdbebe83405116cc7 /weaver | |
parent | 5fb9b7c9aedbab3df52dea7c9024de8beca219cf (diff) | |
download | aspectj-923c2265e677b997c3ad80d48dc78004a1313ff9.tar.gz aspectj-923c2265e677b997c3ad80d48dc78004a1313ff9.zip |
134471 - incremental structure model repair code overhaul - so we don't unnecessarily recompile if a decw changes.
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Checker.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/Checker.java b/weaver/src/org/aspectj/weaver/Checker.java index f123ad36d..a3e2dac1b 100644 --- a/weaver/src/org/aspectj/weaver/Checker.java +++ b/weaver/src/org/aspectj/weaver/Checker.java @@ -101,6 +101,28 @@ public class Checker extends ShadowMunger { public boolean mustCheckExceptions() { return true; } + // XXX this perhaps ought to take account of the other fields in advice ... + public boolean equals(Object other) { + if (! (other instanceof Checker)) return false; + Checker o = (Checker) other; + return + o.isError == isError && + ((o.pointcut == null) ? (pointcut == null) : o.pointcut.equals(pointcut)) && + (World.compareLocations?((o.getSourceLocation()==null) ? (getSourceLocation()==null): o.getSourceLocation().equals(getSourceLocation())):true) // pr134471 - remove when handles are improved to be independent of location + ; + } + + private volatile int hashCode = -1; + public int hashCode() { + if (hashCode == -1) { + int result = 17; + result = 37*result + (isError?1:0); + result = 37*result + ((pointcut == null) ? 0 : pointcut.hashCode()); + hashCode = result; + } + return hashCode; + } + public boolean isError() { return isError; } |