KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > launching > LaunchCommands


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 package ca.mcgill.sable.soot.launching;
21
22 import java.util.MissingResourceException JavaDoc;
23 import java.util.ResourceBundle JavaDoc;
24
25 /**
26  * A bunch of Soot commands (used in the plugin). It is possible to break
27  * these by changing soot_options.xml but atleast only have to change
28  * here.
29  */

30 public class LaunchCommands {
31
32     private static final String JavaDoc RESOURCE_BUNDLE= "ca.mcgill.sable.soot.launching.launchingCmds";//$NON-NLS-1$
33

34     private static ResourceBundle JavaDoc fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
35
36     public static final String JavaDoc SOOT_CLASSPATH = "cp";
37     public static final String JavaDoc XML_ATTRIBUTES = "xml-attributes";
38     public static final String JavaDoc KEEP_LINE_NUMBER = "keep-line-number";
39     public static final String JavaDoc OUTPUT = "f ";
40     public static final String JavaDoc JIMPLE_OUT = "J";
41     public static final String JavaDoc PROCESS_PATH = "process-dir";
42     public static final String JavaDoc DAVA = "f dava";
43     public static final String JavaDoc APP = "app ";
44     public static final String JavaDoc OUTPUT_DIR = "d";
45     public static final String JavaDoc INTRA_PROC = "O --p jop.cse disabled:false --f J ";
46     public static final String JavaDoc EVERYTHING = "W --O --p wjop.si insert-null-checks:false --p jop.cse disabled:false --app --f dava ";
47     public static final String JavaDoc SRC_PREC = "src-prec";
48     public static final String JavaDoc JIMPLE_IN = "J";
49     public static final String JavaDoc CLASS_IN = "class ";
50     public static final String JavaDoc GRIMP_OUT = "g";
51     public static final String JavaDoc INLINING = "--W --app --f grimp ";
52     public static final String JavaDoc STATIC = "--W --app --p wjop.smb diasabled:false --p wjop.si disabled:true --f grimp ";
53     public static final String JavaDoc JAVA_IN = "java";
54
55     private LaunchCommands() {
56         // prevent instantiation of class
57
}
58
59     /**
60      * Returns the resource object with the given key in
61      * the resource bundle. If there isn't any value under
62      * the given key, the key is returned, surrounded by '!'s.
63      *
64      * @param key the resource name
65      * @return the string
66      */

67     public static String JavaDoc getString(String JavaDoc key) {
68         try {
69             return fgResourceBundle.getString(key);
70         } catch (MissingResourceException JavaDoc e) {
71             return "";
72         }
73     }
74     
75
76 }
77
Popular Tags