/** * Retrieves the active hierarchy */ public Hierarchy getActiveHierarchy() { if (!hasActiveHierarchy()) { // throw new RuntimeException("no active Hierarchy present for // scene"); setActiveHierarchy(new Hierarchy()); } return activeHierarchy; }
/** * If exception e is caught at stmt s in body b, return the handler; otherwise, return null. */ static boolean isExceptionCaughtAt(SootClass e, Stmt stmt, Body b) { /* * Look through the traps t of b, checking to see if: - caught exception is e; - and, stmt lies between t.beginUnit and * t.endUnit */ Hierarchy h = new Hierarchy(); Iterator<Trap> trapsIt = b.getTraps().iterator(); while (trapsIt.hasNext()) { Trap t = trapsIt.next(); /* Ah ha, we might win. */ if (h.isClassSubclassOfIncluding(e, t.getException())) { Iterator<Unit> it = b.getUnits().iterator(t.getBeginUnit(), t.getEndUnit()); while (it.hasNext()) { if (stmt.equals(it.next())) { return true; } } } } return false; } }
/** Retrieves the active hierarchy */ public Hierarchy getActiveHierarchy() { if(!hasActiveHierarchy()) //throw new RuntimeException("no active Hierarchy present for scene"); setActiveHierarchy( new Hierarchy() ); return activeHierarchy; }
/** Retrieves the active hierarchy */ public Hierarchy getActiveHierarchy() { if(!hasActiveHierarchy()) //throw new RuntimeException("no active Hierarchy present for scene"); setActiveHierarchy( new Hierarchy() ); return activeHierarchy; }