001: /*
002:
003: Derby - Class org.apache.derbyTesting.functionTests.harness.ibm13
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: /**
028: <p>This class is for IBM's jdk 1.3.
029:
030: @author ames
031: */
032: public class ibm13 extends jvm {
033:
034: public String getName() {
035: return "ibm13";
036: }
037:
038: public ibm13(boolean noasyncgc, boolean verbosegc,
039: boolean noclassgc, long ss, long oss, long ms, long mx,
040: String classpath, String prof, boolean verify,
041: boolean noverify, boolean nojit, Vector D) {
042: super (noasyncgc, verbosegc, noclassgc, ss, oss, ms, mx,
043: classpath, prof, verify, noverify, nojit, D);
044: }
045:
046: // more typical use:
047: public ibm13(String classpath, Vector D) {
048: super (classpath, D);
049: }
050:
051: // more typical use:
052: public ibm13(long ms, long mx, String classpath, Vector D) {
053: super (ms, mx, classpath, D);
054: }
055:
056: // actual use
057: public ibm13() {
058: }
059:
060: // return the command line to invoke this VM. The caller then adds
061: // the class and program arguments.
062: public Vector getCommandLine() {
063: StringBuffer sb = new StringBuffer();
064: Vector v = super .getCommandLine();
065: appendOtherFlags(sb);
066: String s = sb.toString();
067: StringTokenizer st = new StringTokenizer(s);
068: while (st.hasMoreTokens()) {
069: v.addElement(st.nextToken());
070: }
071: return v;
072: }
073:
074: public void appendOtherFlags(StringBuffer sb) {
075: if (noasyncgc)
076: warn("ibm13 does not support noasyncgc");
077: if (verbosegc)
078: sb.append(" -verbose:gc");
079: if (noclassgc)
080: sb.append(" -Xnoclassgc");
081: if (ss >= 0)
082: warn("ibm13 does not support ss");
083: if (oss >= 0)
084: warn("ibm13 does not support oss");
085: if (ms >= 0) {
086: sb.append(" -ms");
087: sb.append(ms);
088: }
089: if (mx >= 0) {
090: sb.append(" -mx");
091: sb.append(mx);
092: }
093: if (classpath != null) {
094: sb.append(" -classpath ");
095: sb.append(classpath);
096: }
097: if (prof != null)
098: warn("ibm13 does not support prof");
099: if (verify)
100: warn("ibm13 does not support verify");
101: if (noverify)
102: warn("ibm13 does not support noverify");
103: if (nojit)
104: sb.append(" -Djava.compiler=NONE");
105: if (D != null)
106: for (int i = 0; i < D.size(); i++) {
107: sb.append(" -D");
108: sb.append((String) (D.elementAt(i)));
109: }
110: }
111:
112: public String getDintro() {
113: return "-D";
114: }
115: }
|