001: /*
002:
003: Derby - Class org.apache.derbyTesting.functionTests.harness.jdk16
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to You under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derbyTesting.functionTests.harness;
023:
024: import java.util.Vector;
025: import java.util.StringTokenizer;
026:
027: public class jdk16 extends jvm {
028:
029: public String getName() {
030: return "jdk16";
031: }
032:
033: public jdk16(boolean noasyncgc, boolean verbosegc,
034: boolean noclassgc, long ss, long oss, long ms, long mx,
035: String classpath, String prof, boolean verify,
036: boolean noverify, boolean nojit, Vector D) {
037: super (noasyncgc, verbosegc, noclassgc, ss, oss, ms, mx,
038: classpath, prof, verify, noverify, nojit, D);
039: }
040:
041: public jdk16(String classpath, Vector D) {
042: super (classpath, D);
043: }
044:
045: public jdk16(long ms, long mx, String classpath, Vector D) {
046: super (ms, mx, classpath, D);
047: }
048:
049: public jdk16() {
050: }
051:
052: public Vector getCommandLine() {
053: StringBuffer sb = new StringBuffer();
054: Vector v = super .getCommandLine();
055: appendOtherFlags(sb);
056: String s = sb.toString();
057: StringTokenizer st = new StringTokenizer(s);
058: while (st.hasMoreTokens()) {
059: v.addElement(st.nextToken());
060: }
061: return v;
062: }
063:
064: public void appendOtherFlags(StringBuffer sb) {
065: if (noasyncgc)
066: warn("jdk16 does not support noasyncgc");
067: if (verbosegc)
068: sb.append(" -verbose:gc");
069: if (noclassgc)
070: sb.append(" -Xnoclassgc");
071: if (ss >= 0)
072: warn("jdk16 does not support ss");
073: if (oss >= 0)
074: warn("jdk16 does not support oss");
075: if (ms >= 0) {
076: sb.append(" -ms");
077: sb.append(ms);
078: }
079: if (mx >= 0) {
080: sb.append(" -mx");
081: sb.append(mx);
082: }
083: if (classpath != null) {
084: sb.append(" -classpath ");
085: sb.append(classpath);
086: }
087: if (prof != null)
088: warn("jdk16 does not support prof");
089: if (verify)
090: warn("jdk16 does not support verify");
091: if (noverify)
092: warn("jdk16 does not support noverify");
093: if (nojit)
094: sb.append(" -Djava.compiler=NONE");
095: if (D != null)
096: for (int i = 0; i < D.size(); i++) {
097: sb.append(" -D");
098: sb.append((String) (D.elementAt(i)));
099: }
100: }
101:
102: public String getDintro() {
103: return "-D";
104: }
105: }
|