KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > functionTests > harness > jdk16


1 /*
2  
3    Derby - Class org.apache.derbyTesting.functionTests.harness.jdk16
4  
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11  
12       http://www.apache.org/licenses/LICENSE-2.0
13  
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19  
20  */

21
22 package org.apache.derbyTesting.functionTests.harness;
23
24 import java.util.Vector JavaDoc;
25 import java.util.StringTokenizer JavaDoc;
26
27
28 public class jdk16 extends jvm {
29     
30     public String JavaDoc getName(){return "jdk16";}
31     public jdk16(boolean noasyncgc, boolean verbosegc, boolean noclassgc,
32         long ss, long oss, long ms, long mx, String JavaDoc classpath, String JavaDoc prof,
33         boolean verify, boolean noverify, boolean nojit, Vector JavaDoc D) {
34         super(noasyncgc,verbosegc,noclassgc,ss,oss,ms,mx,classpath,prof,
35             verify,noverify,nojit,D);
36     }
37     
38     public jdk16(String JavaDoc classpath, Vector JavaDoc D) {
39         super(classpath,D);
40     }
41     
42     public jdk16(long ms, long mx, String JavaDoc classpath, Vector JavaDoc D) {
43         super(ms,mx,classpath,D);
44     }
45     
46     public jdk16() { }
47     
48     
49     public Vector JavaDoc getCommandLine() {
50         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
51         Vector JavaDoc v = super.getCommandLine();
52         appendOtherFlags(sb);
53         String JavaDoc s = sb.toString();
54         StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(s);
55         while (st.hasMoreTokens()) {
56             v.addElement(st.nextToken());
57         }
58         return v;
59     }
60     
61     public void appendOtherFlags(StringBuffer JavaDoc sb) {
62         if (noasyncgc) warn("jdk16 does not support noasyncgc");
63         if (verbosegc) sb.append(" -verbose:gc");
64         if (noclassgc) sb.append(" -Xnoclassgc");
65         if (ss>=0) warn("jdk16 does not support ss");
66         if (oss>=0) warn("jdk16 does not support oss");
67         if (ms>=0) {
68             sb.append(" -ms");
69             sb.append(ms);
70         }
71         if (mx>=0) {
72             sb.append(" -mx");
73             sb.append(mx);
74         }
75         if (classpath!=null) {
76             sb.append(" -classpath ");
77             sb.append(classpath);
78         }
79         if (prof!=null) warn("jdk16 does not support prof");
80         if (verify) warn("jdk16 does not support verify");
81         if (noverify) warn("jdk16 does not support noverify");
82         if (nojit) sb.append(" -Djava.compiler=NONE");
83         if (D != null)
84             for (int i=0; i<D.size();i++) {
85             sb.append(" -D");
86             sb.append((String JavaDoc)(D.elementAt(i)));
87             }
88     }
89     public String JavaDoc getDintro() { return "-D"; }
90 }
91
Popular Tags