public boolean remove(String phaseName) { for (Transform tr : opts) { if (tr.getPhaseName().equals(phaseName)) { opts.remove(tr); return true; } } return false; }
/** * Removes the given list of fall through IfStmts from the body. **/ protected void removeStmts(List<IfStmt> deadStmts) { Chain units = sb.getUnits(); Iterator<IfStmt> deadIt = deadStmts.iterator(); while (deadIt.hasNext()) { Unit dead = deadIt.next(); units.remove(dead); dead.clearUnitBoxes(); } }
public void removeClass(SootClass c) { if (!c.isInScene()) { throw new RuntimeException(); } classes.remove(c); if (c.isLibraryClass()) { libraryClasses.remove(c); } else if (c.isPhantomClass()) { phantomClasses.remove(c); } else if (c.isApplicationClass()) { applicationClasses.remove(c); } c.getType().setSootClass(null); c.setInScene(false); modifyHierarchy(); }
if (!mainPegChain.remove(head)) { throw new RuntimeException("fail to remove begin node in from mainPegChain!");
/** * Removes the given class from the list of interfaces which are directly implemented by this class. */ public void removeInterface(SootClass interfaceClass) { checkLevel(HIERARCHY); if (!implementsInterface(interfaceClass.getName())) { throw new RuntimeException("no such interface: " + interfaceClass.getName()); } interfaces.remove(interfaceClass); }
units.remove(head);
while (it.hasNext()) { JPegStmt s = (JPegStmt) it.next(); chain.remove(s); allNodes.remove(s); unitToSuccs.remove(s);
while (it.hasNext()) { Object s = it.next(); chain.remove(s); allNodes.remove(s); unitToSuccs.remove(s);
/** * Removes a Unit occurring before some other Unit in the Block. * * @param item * A Unit to be remove from the Block's Unit Chain. * @return True if the item could be found and removed. * */ public boolean remove(Unit item) { Chain<Unit> methodBody = mBody.getUnits(); if (item == mHead) { mHead = methodBody.getSuccOf(item); } else if (item == mTail) { mTail = methodBody.getPredOf(item); } return methodBody.remove(item); }
/** * Removes the given field from this class. */ public void removeField(SootField f) { checkLevel(SIGNATURES); if (!f.isDeclared() || f.getDeclaringClass() != this) { throw new RuntimeException("did not declare: " + f.getName()); } if (fields != null) { fields.remove(f); } f.setDeclared(false); f.setDeclaringClass(null); }
/** Makes this class a phantom class. */ public void setPhantomClass() { Chain<SootClass> c = Scene.v().getContainingChain(this); if (c != null) { c.remove(this); } Scene.v().getPhantomClasses().add(this); isPhantom = true; }
/** Removes the given object from this Chain. */ @Override @SuppressWarnings("unchecked") public boolean remove(Object obj) { boolean res = false; if (contains(obj)) { Unit successor = getSuccOf((E) obj); if (successor == null) { successor = getPredOf((E) obj); } // Note that redirecting to the last unit in the method // like this is probably incorrect when dealing with a Trap. // I.e., let's say that the final unit in the method used to // be U10, preceded by U9, and that there was a Trap which // returned U10 as getEndUnit(). I.e., before the trap covered U9. // When we redirect the Trap's end unit to U9, the trap will no // longer cover U9. I know this is incorrect, but I'm not sure how // to fix it, so I'm leaving this comment in the hopes that some // future maintainer will see the right course to take. res = innerChain.remove(obj); ((E) obj).redirectJumpsToThisTo(successor); } return res; }
/** Makes this class a library class. */ public void setLibraryClass() { if (isLibraryClass()) { return; } Chain<SootClass> c = Scene.v().getContainingChain(this); if (c != null) { c.remove(this); } Scene.v().getLibraryClasses().add(this); isPhantom = false; }
/** Makes this class an application class. */ public void setApplicationClass() { if (isApplicationClass()) { return; } Chain<SootClass> c = Scene.v().getContainingChain(this); if (c != null) { c.remove(this); } Scene.v().getApplicationClasses().add(this); isPhantom = false; }
units.remove(u);
units.remove(tmpstmt);
units.remove(stmt);
containerStmts.remove(as);