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

soot.dava.DavaBuildFile Maven / Gradle / Ivy

package soot.dava;

/*-
 * #%L
 * Soot - a J*va Optimization Framework
 * %%
 * Copyright (C) 2006 Nomair A. Naeem
 * %%
 * This program 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 program 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 General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;

/*
 * TODO: Jalopy would be awesome here!!
 */
public class DavaBuildFile {
  public static void generate(PrintWriter out, ArrayList decompiledClasses) {
    out.print("\n");
    out.print("	\n");
    out.print("  This is the build file produced by Dava for the decompiled code.\n");
    out.print("  New features like (formatting using jalopy etc) will be added to this build file\n");
    out.print("\n");
    out.print("\n");
    out.print("\n");
    out.print("\n");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    /*
     * out.print("\n"); out.print("\n");
     * out.print("		\n"); out.print("		\n");
     * out.print("		\n"); // out.print("		\n");
     * out.print("\n");
     */
    out.print("	\n");
    out.print("	\n");
    out.print("	\n");
    out.print("	  \n");
    out.print("		 \n");
    out.print("	  \n");
    out.print("	 \n");
    out.print("	\n");

    out.print("	\n");
    out.print("\n");
    /*
     * NEED TO MAKE SURE SRC-PREC IS SET so that java to jimple gets evaluate The command is going to be java soot.Main
     * -ast-metrics followed by all the classes on which we had originally done the decompile Need a specialized task
     */

    out.print("   \n");
    out.print("		\n");
    out.print("		\n");
    out.print("		\n");
    out.print("		\n");
    out.print("		\n");

    Iterator it = decompiledClasses.iterator();
    while (it.hasNext()) {
      String temp = it.next();
      if (temp.endsWith(".java")) {
        temp = temp.substring(0, temp.length() - 5);
      }
      // System.out.println(temp);
      out.print("		\n");

    }

    out.print("");
    out.print("	  \n");
    out.print("	\n");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");
    out.print("");

  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy