/** * Adds the given class to the Scene. This method does not handle any dependencies such as invalidating the hierarchy. The * class is neither marked as application class, nor library class. * * @param c * The class to add */ protected void addClassSilent(SootClass c) { if (c.isInScene()) { throw new RuntimeException("already managed: " + c.getName()); } if (containsClass(c.getName())) { throw new RuntimeException("duplicate class: " + c.getName()); } classes.add(c); nameToClass.put(c.getName(), c.getType()); c.getType().setSootClass(c); c.setInScene(true); // Phantom classes are not really part of the hierarchy anyway, so // we can keep the old one if (!c.isPhantom) { modifyHierarchy(); } }
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(); }
mediatingClass.setInScene(true);
public void addClass(SootClass c) { if(c.isInScene()) throw new RuntimeException("already managed: "+c.getName()); if(containsClass(c.getName())) throw new RuntimeException("duplicate class: "+c.getName()); classes.add(c); c.setLibraryClass(); nameToClass.put(c.getName(), c.getType()); c.getType().setSootClass(c); c.setInScene(true); modifyHierarchy(); }
public void addClass(SootClass c) { if(c.isInScene()) throw new RuntimeException("already managed: "+c.getName()); if(containsClass(c.getName())) throw new RuntimeException("duplicate class: "+c.getName()); classes.add(c); c.setLibraryClass(); nameToClass.put(c.getName(), c.getType()); c.getType().setSootClass(c); c.setInScene(true); modifyHierarchy(); }
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(); }
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(); }