< prev index next >

test/hotspot/jtreg/runtime/InvocationTests/shared/AbstractGenerator.java

Print this page




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package shared;
  26 
  27 import java.io.File;
  28 import java.io.FileOutputStream;
  29 import java.util.Arrays;
  30 import java.util.Map;
  31 import java.util.List;
  32 import java.util.ArrayList;
  33 
  34 /**
  35  *
  36  */
  37 public abstract class AbstractGenerator {
  38     protected final boolean dumpClasses;
  39     protected final boolean executeTests;
  40     private static int testNum = 0;
  41 
  42     protected AbstractGenerator(String[] args) {
  43         List<String> params = new ArrayList<String>(Arrays.asList(args));
  44 
  45         if (params.contains("--help")) {
  46             Utils.printHelp();
  47             System.exit(0);
  48         }
  49 
  50         dumpClasses = params.contains("--dump");
  51         executeTests = !params.contains("--noexecute");
  52 
  53         params.remove("--dump");
  54         params.remove("--noexecute");
  55 
  56         Utils.init(params);




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package shared;
  26 
  27 import java.io.File;
  28 import java.io.FileOutputStream;
  29 import java.util.Arrays;
  30 import java.util.Map;
  31 import java.util.List;
  32 import java.util.ArrayList;
  33 



  34 public abstract class AbstractGenerator {
  35     protected final boolean dumpClasses;
  36     protected final boolean executeTests;
  37     private static int testNum = 0;
  38 
  39     protected AbstractGenerator(String[] args) {
  40         List<String> params = new ArrayList<String>(Arrays.asList(args));
  41 
  42         if (params.contains("--help")) {
  43             Utils.printHelp();
  44             System.exit(0);
  45         }
  46 
  47         dumpClasses = params.contains("--dump");
  48         executeTests = !params.contains("--noexecute");
  49 
  50         params.remove("--dump");
  51         params.remove("--noexecute");
  52 
  53         Utils.init(params);


< prev index next >