Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* Soot - a J*va Optimization Framework
* Copyright (C) 2003 Ondrej Lhotak
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* THIS FILE IS AUTO-GENERATED FROM soot_options.xml. DO NOT MODIFY. */
package soot.options;
import soot.*;
import java.util.*;
import soot.PackManager;
/** Soot command-line options parser.
* @author Ondrej Lhotak
*/
public class Options extends OptionsBase {
public Options(Singletons.Global g) { }
public static Options v() { return G.v().soot_options_Options(); }
public boolean parse( String[] argv ) {
LinkedList phaseOptions = new LinkedList();
for( int i = argv.length; i > 0; i-- ) {
pushOptions( argv[i-1] );
}
while( hasMoreOptions() ) {
String option = nextOption();
if( option.charAt(0) != '-' ) {
classes.add( option );
continue;
}
while( option.charAt(0) == '-' ) {
option = option.substring(1);
}
if( false );
else {
G.v().out.println( "Invalid option -"+option );
return false;
}
}
Iterator it = phaseOptions.iterator();
while( it.hasNext() ) {
String phaseName = (String) it.next();
String phaseOption = (String) it.next();
if( !setPhaseOption( phaseName, "enabled:true" ) ) return false;
}
it = phaseOptions.iterator();
while( it.hasNext() ) {
String phaseName = (String) it.next();
String phaseOption = (String) it.next();
if( !setPhaseOption( phaseName, phaseOption ) ) return false;
}
return true;
}
public String getUsage() {
return ""
;
}
}
else if( false
|| option.equals( "" )
)
= true;
else if( false
|| option.equals( "" )
) {
if( !hasMoreOptions() ) {
G.v().out.println( "No value given for option -"+option );
return false;
}
String value = nextOption();
if( false );
else if( false
|| value.equals( "" )
) {
if( != 0
&& != _ ) {
G.v().out.println( "Multiple values given for option "+option );
return false;
}
= _;
}
else {
G.v().out.println( "Invalid value "+value+" given for option -"+option );
return false;
}
}
else if( false
|| option.equals( "" )
) {
if( !hasMoreOptions() ) {
G.v().out.println( "No value given for option -"+option );
return false;
}
String value = nextOption();
if( == null )
= new LinkedList();
.add( value );
}
else if( false
|| option.equals( "" )
) {
if( !hasMoreOptions() ) {
G.v().out.println( "No phase name given for option -"+option );
return false;
}
String phaseName = nextOption();
if( !hasMoreOptions() ) {
G.v().out.println( "No phase option given for option -"+option+" "+phaseName );
return false;
}
String phaseOption = nextOption();
phaseOptions.add( phaseName );
phaseOptions.add( phaseOption );
}
else if( false
|| option.equals( "" )
) {
if( !hasMoreOptions() ) {
G.v().out.println( "No value given for option -"+option );
return false;
}
String value = nextOption();
if( .length() == 0 )
= value;
else {
G.v().out.println( "Duplicate values "++" and "+value+" for option -"+option );
return false;
}
}
else if( false
|| option.equals( "" )
) {
pushOptions( "" );
}
public boolean () { return ; }
private boolean = false;
public void set_( boolean setting ) { = setting; }
public int () {
if( == 0 ) return _;
return ;
}
public void set_( int setting ) { = setting; }
private int = 0;
public List () {
if( == null )
return java.util.Collections.EMPTY_LIST;
else
return ;
}
public void set_( List setting ) { = setting; }
private List = null;
public String () { return ; }
public void set_( String setting ) { = setting; }
private String = "";
public static final int _ = ;
+"\n:\n"
+padOpt(" -", "" )
+padOpt(" -", "" )
+padVal(" (default)", "" )
+padOpt(" -", "" )
+padOpt(" -", "" )
+padOpt(" -", "" )
+padOpt(" -", "" )
/* Soot - a J*va Optimization Framework
* Copyright (C) 2003 Ondrej Lhotak
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* THIS FILE IS AUTO-GENERATED FROM soot_options.xml. DO NOT MODIFY. */
package soot.options;
import java.util.*;
/** Option parser for . */
public class extends
{
private Map options;
public ( Map options ) {
this.options = options;
}
/** --
.
*/
public boolean () {
return soot.PhaseOptions.getBoolean( options, "" );
}
/** --
.
*/
public int () {
return soot.PhaseOptions.getInt( options, "" );
}
/** --
.
*/
public float () {
return soot.PhaseOptions.getFloat( options, "" );
}
/** --
.
*/
public String () {
return soot.PhaseOptions.getString( options, "" );
}
public static final int _ = ;
/** --
.
*/
public int () {
String s = soot.PhaseOptions.getString( options, "" );
if( s.equalsIgnoreCase( "" ) )
return _;
throw new RuntimeException( "Invalid value "+s+" of phase option " );
}
}
public String getPhaseList() {
return ""
+padOpt("", "")
+padVal("", "");
}
public String getPhaseHelp( String phaseName ) {
if( phaseName.equals( "" ) )
return "Phase "+phaseName+":\n"+
""
+"\n\nRecognized options (with default values):\n"
+padOpt( " ()", "" )
+padVal( " (default)", "" )
;
return "Unrecognized phase: "+phaseName;
}
public static String getDeclaredOptionsForPhase( String phaseName ) {
if( phaseName.equals( "" ) )
return ""
+" ";
// The default set of options is just enabled.
return "enabled";
}
public static String getDefaultOptionsForPhase( String phaseName ) {
if( phaseName.equals( "" ) )
return ""
+": "
+": ";
// The default default value is enabled.
return "enabled";
}
public void warnForeignPhase( String phaseName ) {
if( phaseName.equals( "" ) ) return;
G.v().out.println( "Warning: Phase "+phaseName+" is not a standard Soot phase listed in XML files." );
}
public void warnNonexistentPhase() {
if( !PackManager.v().hasPhase( "" ) )
G.v().out.println( "Warning: Options exist for non-existent phase " );
}
\n
* ARG