public boolean processPhaseOptions(String phaseName, String option) { StringTokenizer st = new StringTokenizer(option, ","); while (st.hasMoreTokens()) { if (!setPhaseOption(phaseName, st.nextToken())) { return false; } } return true; }
PhaseOptions.v().setPhaseOption("jb.lns", "sort-locals:true");
public boolean setPhaseOption(String phaseName, String option) { HasPhaseOptions phase = getPM().getPhase(phaseName); if (phase == null) { logger.debug("" + "Option " + option + " given for nonexistent" + " phase " + phaseName); return false; } return setPhaseOption(phase, option); }
PhaseOptions.v().setPhaseOption("jb.lns", "sort-locals:true"); PackManager.v().getTransform("jb.lns").apply(b);
private void resetRadioPack(String phaseName) { for (Pack p : getPM().allPacks()) { if (!(p instanceof RadioScenePack)) { continue; } if (p.get(phaseName) == null) { continue; } for (Iterator<Transform> tIt = p.iterator(); tIt.hasNext();) { final Transform t = (Transform) tIt.next(); setPhaseOption(t.getPhaseName(), "enabled:false"); } } }
private void checkEnabled(Transform t) { Map<String, String> options = PhaseOptions.v().getPhaseOptions(t); if (PhaseOptions.getBoolean(options, "enabled")) { // Enabling this one will disable all the others PhaseOptions.v().setPhaseOption(t, "enabled:true"); } } }
private void registerGuard(SootMethod container, Stmt stmt, String string) { guards.add(new Guard(container, stmt, string)); if (options.verbose()) { logger.debug("Incomplete trace file: Class.forName() is called in method '" + container + "' but trace contains no information about the receiver class of this call."); if (options.guards().equals("ignore")) { logger.debug("Guarding strategy is set to 'ignore'. Will ignore this problem."); } else if (options.guards().equals("print")) { logger.debug("Guarding strategy is set to 'print'. " + "Program will print a stack trace if this location is reached during execution."); } else if (options.guards().equals("throw")) { logger.debug("Guarding strategy is set to 'throw'. Program will throw an " + "Error if this location is reached during execution."); } else { throw new RuntimeException("Invalid value for phase option (guarding): " + options.guards()); } } if (!registeredTransformation) { registeredTransformation = true; PackManager.v().getPack("wjap").add(new Transform("wjap.guards", new SceneTransformer() { @Override protected void internalTransform(String phaseName, Map<String, String> options) { for (Guard g : guards) { insertGuard(g); } } })); PhaseOptions.v().setPhaseOption("wjap.guards", "enabled"); } }
PhaseOptions.v().setPhaseOption("cg", "off");
public boolean processPhaseOptions(String phaseName, String option) { StringTokenizer st = new StringTokenizer(option, ","); while (st.hasMoreTokens()) { if( !setPhaseOption( phaseName, st.nextToken() ) ) { return false; } } return true; }
public boolean processPhaseOptions(String phaseName, String option) { StringTokenizer st = new StringTokenizer(option, ","); while (st.hasMoreTokens()) { if( !setPhaseOption( phaseName, st.nextToken() ) ) { return false; } } return true; }
public boolean setPhaseOption( String phaseName, String option ) { HasPhaseOptions phase = getPM().getPhase( phaseName ); if( phase == null ) { G.v().out.println( "Option "+option+" given for nonexistent" +" phase "+phaseName ); return false; } return setPhaseOption( phase, option ); } public boolean setPhaseOption( HasPhaseOptions phase, String option ) {
public boolean setPhaseOption( String phaseName, String option ) { HasPhaseOptions phase = getPM().getPhase( phaseName ); if( phase == null ) { G.v().out.println( "Option "+option+" given for nonexistent" +" phase "+phaseName ); return false; } return setPhaseOption( phase, option ); } public boolean setPhaseOption( HasPhaseOptions phase, String option ) {
private void resetRadioPack( String phaseName ) { for (Pack p : getPM().allPacks()) { if( !(p instanceof RadioScenePack) ) continue; if( p.get(phaseName) == null ) continue; for( Iterator tIt = p.iterator(); tIt.hasNext(); ) { final Transform t = (Transform) tIt.next(); setPhaseOption( t.getPhaseName(), "enabled:false" ); } } } private boolean checkParentEnabled( String phaseName ) {
private void resetRadioPack( String phaseName ) { for (Pack p : getPM().allPacks()) { if( !(p instanceof RadioScenePack) ) continue; if( p.get(phaseName) == null ) continue; for( Iterator tIt = p.iterator(); tIt.hasNext(); ) { final Transform t = (Transform) tIt.next(); setPhaseOption( t.getPhaseName(), "enabled:false" ); } } } private boolean checkParentEnabled( String phaseName ) {
private void checkEnabled(Transform t) { Map options = PhaseOptions.v().getPhaseOptions(t); if( PhaseOptions.getBoolean( options, "enabled" ) ) { // Enabling this one will disable all the others PhaseOptions.v().setPhaseOption( t, "enabled:true" ); } } }
private void checkEnabled(Transform t) { Map options = PhaseOptions.v().getPhaseOptions(t); if( PhaseOptions.getBoolean( options, "enabled" ) ) { // Enabling this one will disable all the others PhaseOptions.v().setPhaseOption( t, "enabled:true" ); } } }
PhaseOptions.v().setPhaseOption("wjap.guards", "enabled");
PhaseOptions.v().setPhaseOption("wjap.guards", "enabled");