/** * Make sure that the JimpleBody is well formed. If not, throw an exception. Right now, performs only a handful of checks. */ @Override public void validate() { final List<ValidationException> exceptionList = new ArrayList<ValidationException>(); validate(exceptionList); if (!exceptionList.isEmpty()) { throw exceptionList.get(0); } }
body.validate();
public void applyTransformation() { for (JimpleBody body : this.getSceneBodies()) { Map<Unit, List<Unit>> toReplace = new LinkedHashMap<Unit, List<Unit>>(); PatchingChain<Unit> units = body.getUnits(); for (Unit u : units) { if (u instanceof SwitchStmt) { toReplace.put(u, replaceSwitchStatement((SwitchStmt) u)); } } for (Entry<Unit, List<Unit>> entry : toReplace.entrySet()) { units.insertBefore(entry.getValue(), entry.getKey()); units.remove(entry.getKey()); } body.validate(); } }
PackManager.v().getPack("jtp").apply(body); if( Options.v().validate() ) { body.validate();
PackManager.v().getPack("jtp").apply(body); if( Options.v().validate() ) { body.validate();
body.validate(); } catch (soot.validation.ValidationException e) { throw e;