// insert a call to debugSnapshot() somewhere in the analysis
// to get successive captures of the analysis state
boolean takeDebugSnapshots = false;
- String mcDescSymbolDebug = "setFlightPlan";
+ String mcDescSymbolDebug = "StandardEngine";
boolean stopAfterCapture = true;
// increments every visit to debugSnapshot, don't fiddle with it
int iterStartCapture = 0;
// the number of snapshots to take
- int numIterToCapture = 10;
+ int numIterToCapture = 100;
void debugSnapshot(OwnershipGraph og, FlatNode fn) {
if( debugCounter > iterStartCapture + numIterToCapture ) {
String debugCaller = "foo";
String debugCallee = "bar";
-
if( mc.getDescriptor().getSymbol().equals( debugCaller ) &&
fm.getMethod().getSymbol().equals( debugCallee ) ) {
return false;
}
- Iterator fieldsSrcItr = tdSrc.getClassDesc().getFields();
- while( fieldsSrcItr.hasNext() ) {
- FieldDescriptor fd = (FieldDescriptor) fieldsSrcItr.next();
- if( fd.getType().equals( edge.getType() ) &&
- fd.getSymbol().equals( edge.getField() ) ) {
- return true;
+ ClassDescriptor cd = tdSrc.getClassDesc();
+ while( cd != null ) {
+ Iterator fieldItr = cd.getFields();
+
+ while( fieldItr.hasNext() ) {
+ FieldDescriptor fd = (FieldDescriptor) fieldItr.next();
+
+ if( fd.getType().equals( edge.getType() ) &&
+ fd.getSymbol().equals( edge.getField() ) ) {
+ return true;
+ }
}
+
+ cd = cd.getSuperDesc();
}
-
+
// otherwise it is a class with fields
// but we didn't find a match
return false;