for (Iterator i = factory.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
DeclareSoft d = (DeclareSoft)i.next();
// We need the exceptionType to match the type in the declare soft statement
// This means it must either be the same type or a subtype
ResolvedType throwException = factory.fromEclipse((ReferenceBinding)exceptionType);
FuzzyBoolean isExceptionTypeOrSubtype =
d.getException().matchesInstanceof(throwException);
if (!isExceptionTypeOrSubtype.alwaysTrue() ) continue;
if (callSite != null) {
FuzzyBoolean match = d.getPointcut().match(callSite);
if (match.alwaysTrue()) {
//System.err.println("matched callSite: " + callSite + " with " + d);
return;
} else if (!match.alwaysFalse()) {
//!!! need this check to happen much sooner
//throw new RuntimeException("unimplemented, shouldn't have fuzzy match here");
}
}
if (enclosingExec != null) {
FuzzyBoolean match = d.getPointcut().match(enclosingExec);
if (match.alwaysTrue()) {
//System.err.println("matched enclosingExec: " + enclosingExec + " with " + d);
return;
} else if (!match.alwaysFalse()) {
//!!! need this check to happen much sooner
//throw new RuntimeException("unimplemented, shouldn't have fuzzy match here");
}
}
}