All Downloads are FREE. Search and download functionalities are using the official Maven repository.

soot.options.ant-task.xsl Maven / Gradle / Ivy

There is a newer version: 1.12.0
Show newest version


  
  





  
/* Soot - a J*va Optimization Framework
 * Copyright (C) 2004 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;
import org.apache.tools.ant.*;
import org.apache.tools.ant.taskdefs.*;
import org.apache.tools.ant.types.*;
import soot.*;
import java.util.*;
import java.io.*;

/** Soot ant task.
 * @author Ondrej Lhotak
 */

public class AntTask extends MatchingTask {
    public static final boolean DEBUG = true;
    private void debug(String s) {
        if(DEBUG) System.err.println(s);
    }
    private ArrayList args = new ArrayList();
    public List args() { return args; }
    private void addArg( String s ) { args.add(s); }
    private void addArg( String s, String s2 ) { args.add(s); args.add(s2); }
    private Path appendToPath( Path old, Path newPath ) {
        if( old == null ) return newPath;
        old.append(newPath);
        return old;
    }
    private void addPath(String option, Path path) {
        if( path.size() == 0 ) return;
        addArg(option);
        addArg(path.toString());
    }
    private List phaseopts = new ArrayList(); 

    public void execute() throws BuildException {

        if(DEBUG) System.out.println(args);
        try {
            soot.Main.main((String[]) args.toArray(new String[0]));
            soot.G.v().reset();
        } catch( Exception e ) {
            e.printStackTrace();
            throw new BuildException(e);
        }
    }




}
  





  
        private Path  = null;
  





  
        if(  != null ) addPath("-", );
  





  
      
  


  
        public void set(boolean arg) {
            if(arg) addArg("-");
        }
  


  
        public void set(String arg) {
            if(false
    
      
                || arg.equals( "" )
      
    
                ) {
                addArg("-");
                addArg(arg);
            } else {
                throw new BuildException("Bad value "+arg+" for option ");
            }
        }
  


  
        public void set(Path arg) {
            if( == null )
                 = new Path(getProject());
             = appendToPath(, arg);
        }

        public Path create() {
            if( == null )
                 = new Path(getProject());
            return .createPath();
        }
  


  
            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 );
            }
  


  
        public void set(String arg) {
            addArg("-");
            addArg(arg);
        }
  


  
  





  
      
  


  
    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(" -", "" )
  










  
    
        
        public Object createp_() {
            Object ret = new PhaseOpt();
            phaseopts.add(ret);
            return ret;
        }
        public class PhaseOpt {
      
          public void set(boolean arg) {
            addArg("-p");
            addArg("");
            addArg(":"+(arg?"true":"false"));
          }
      
      
          public void set(String arg) {
            addArg("-p");
            addArg("");
            addArg(":"+arg);
          }
      
        }
    
  










  
    
    
      
      \n
    
  

  
    
    
      
      
     * 
    
  

  
    
    
    
      
      
      
    
  

  
    
    
    
    
    
      
        
        
          
          
          
        
      
      
        
        
          
             
          
          
            
            
            
          
        
      
    
  

  
    
  

  
  
  
    
      
    
    ARG
  
  

  
  
  





© 2015 - 2024 Weber Informatics LLC | Privacy Policy