@Override public ThrowableSet getThrowables() { if (null == throwables) { throwables = throwAnalysis.mightThrow(u); } return throwables; } };
@Override public ThrowableSet getThrowables() { if (null == throwables) { throwables = ThrowableSet.Manager.v().EMPTY; for (Unit unit : b) { throwables = throwables.add(throwAnalysis.mightThrow(unit)); } } return throwables; } };
ThrowableSet thrownSet = unitToUncaughtThrowables.get(unit); if (thrownSet == null) { thrownSet = throwAnalysis.mightThrow(unit);
/** * Returns a collection of * {@link ExceptionalUnitGraph.ExceptionDest ExceptionDest} * objects which represent how exceptions thrown by a specified * unit will be handled. * * @param u The unit for which to provide exception information. * (<code>u</code> must be a <code>Unit</code>, though the parameter is * declared as an <code>Object</code> to satisfy the interface of * {@link soot.toolkits.graph.ExceptionalGraph ExceptionalGraph}. * * @return a collection of <code>ExceptionDest</code> objects describing * the traps, if any, which catch the exceptions * which may be thrown by <code>u</code>. */ public Collection<ExceptionDest> getExceptionDests(Unit u) { Collection<ExceptionDest> result = (Collection<ExceptionDest>) unitToExceptionDests.get(u); if (result == null) { result = new LinkedList<ExceptionDest>(); result.add(new ExceptionDest(null, throwAnalysis.mightThrow((Unit) u))); } return result; }
/** * Returns a collection of * {@link ExceptionalUnitGraph.ExceptionDest ExceptionDest} * objects which represent how exceptions thrown by a specified * unit will be handled. * * @param u The unit for which to provide exception information. * (<code>u</code> must be a <code>Unit</code>, though the parameter is * declared as an <code>Object</code> to satisfy the interface of * {@link soot.toolkits.graph.ExceptionalGraph ExceptionalGraph}. * * @return a collection of <code>ExceptionDest</code> objects describing * the traps, if any, which catch the exceptions * which may be thrown by <code>u</code>. */ public Collection<ExceptionDest> getExceptionDests(Unit u) { Collection<ExceptionDest> result = (Collection<ExceptionDest>) unitToExceptionDests.get(u); if (result == null) { result = new LinkedList<ExceptionDest>(); result.add(new ExceptionDest(null, throwAnalysis.mightThrow((Unit) u))); } return result; }
public Collection<ExceptionDest> getExceptionDests(Block b) { if (blockToExceptionDests == null) { Block block = (Block) b; Collection<ExceptionDest> result = new ArrayList<ExceptionDest>(1); ThrowableSet throwables = ThrowableSet.Manager.v().EMPTY; for (Iterator<Unit> unitIt = block.iterator(); unitIt.hasNext(); ) { Unit unit = unitIt.next(); throwables = throwables.add(throwAnalysis.mightThrow(unit)); } result.add(new ExceptionalBlockGraph.ExceptionDest(null, throwables, null)); return result; } else { return blockToExceptionDests.get(b); } }
public Collection<ExceptionDest> getExceptionDests(Block b) { if (blockToExceptionDests == null) { Block block = (Block) b; Collection<ExceptionDest> result = new ArrayList<ExceptionDest>(1); ThrowableSet throwables = ThrowableSet.Manager.v().EMPTY; for (Iterator<Unit> unitIt = block.iterator(); unitIt.hasNext(); ) { Unit unit = unitIt.next(); throwables = throwables.add(throwAnalysis.mightThrow(unit)); } result.add(new ExceptionalBlockGraph.ExceptionDest(null, throwables, null)); return result; } else { return blockToExceptionDests.get(b); } }
ThrowableSet thrownSet = unitToUncaughtThrowables.get(unit); if (thrownSet == null) { thrownSet = throwAnalysis.mightThrow(unit);
ThrowableSet thrownSet = unitToUncaughtThrowables.get(unit); if (thrownSet == null) { thrownSet = throwAnalysis.mightThrow(unit);
private void fixExceptions(SootMethod caller, Unit callSite, Set<SootClass> doneSet) { ThrowAnalysis ta = Options.v().src_prec() == Options.src_prec_apk ? DalvikThrowAnalysis.v() : UnitThrowAnalysis.v(); ThrowableSet throwSet = ta.mightThrow(callSite);