1 19 20 package soot.jimple.toolkits.callgraph; 21 22 import soot.*; 23 import java.util.*; 24 import soot.options.CGOptions; 25 26 28 public class CallGraphPack extends RadioScenePack 29 { 30 public CallGraphPack(String name) { 31 super(name); 32 } 33 34 protected void internalApply() 35 { 36 CGOptions options = new CGOptions( PhaseOptions.v().getPhaseOptions(this) ); 37 if(!options.implicit_entry()) { 38 Scene.v().setEntryPoints(EntryPoints.v().application()); 39 } 40 super.internalApply(); 41 ClinitElimTransformer trimmer = new ClinitElimTransformer(); 42 43 if( options.trim_clinit() ) { 44 for( Iterator clIt = Scene.v().getClasses(SootClass.BODIES).iterator(); clIt.hasNext(); ) { 45 final SootClass cl = (SootClass) clIt.next(); 46 for( Iterator mIt = cl.getMethods().iterator(); mIt.hasNext(); ) { 47 final SootMethod m = (SootMethod) mIt.next(); 48 if( m.isConcrete() && m.hasActiveBody() ) { 49 trimmer.transform( m.getActiveBody() ); 50 } 51 } 52 } 53 } 54 } 55 } 56 | Popular Tags |