1 11 12 package org.eclipse.jdt.launching; 13 14 15 import java.util.Map ; 16 17 import org.eclipse.jdt.internal.launching.LaunchingMessages; 18 19 26 public class VMRunnerConfiguration { 27 private String fClassToLaunch; 28 private String [] fVMArgs; 29 private String [] fProgramArgs; 30 private String [] fEnvironment; 31 private String [] fClassPath; 32 private String [] fBootClassPath; 33 private String fWorkingDirectory; 34 private Map fVMSpecificAttributesMap; 35 private boolean fResume = true; 36 37 private static final String [] fgEmpty= new String [0]; 38 39 46 public VMRunnerConfiguration(String classToLaunch, String [] classPath) { 47 if (classToLaunch == null) { 48 throw new IllegalArgumentException (LaunchingMessages.vmRunnerConfig_assert_classNotNull); 49 } 50 if (classPath == null) { 51 throw new IllegalArgumentException (LaunchingMessages.vmRunnerConfig_assert_classPathNotNull); 52 } 53 fClassToLaunch= classToLaunch; 54 fClassPath= classPath; 55 } 56 57 64 public void setVMSpecificAttributesMap(Map map) { 65 fVMSpecificAttributesMap = map; 66 } 67 68 77 public void setVMArguments(String [] args) { 78 if (args == null) { 79 throw new IllegalArgumentException (LaunchingMessages.vmRunnerConfig_assert_vmArgsNotNull); 80 } 81 fVMArgs= args; 82 } 83 84 93 public void setProgramArguments(String [] args) { 94 if (args == null) { 95 throw new IllegalArgumentException (LaunchingMessages.vmRunnerConfig_assert_programArgsNotNull); 96 } 97 fProgramArgs= args; 98 } 99 100 109 public void setEnvironment(String [] environment) { 110 fEnvironment= environment; 111 } 112 113 127 public void setBootClassPath(String [] bootClassPath) { 128 fBootClassPath= bootClassPath; 129 } 130 131 138 public Map getVMSpecificAttributesMap() { 139 return fVMSpecificAttributesMap; 140 } 141 142 147 public String getClassToLaunch() { 148 return fClassToLaunch; 149 } 150 151 156 public String [] getClassPath() { 157 return fClassPath; 158 } 159 160 179 public String [] getBootClassPath() { 180 return fBootClassPath; 181 } 182 183 189 public String [] getVMArguments() { 190 if (fVMArgs == null) { 191 return fgEmpty; 192 } 193 return fVMArgs; 194 } 195 196 202 public String [] getProgramArguments() { 203 if (fProgramArgs == null) { 204 return fgEmpty; 205 } 206 return fProgramArgs; 207 } 208 209 215 public String [] getEnvironment() { 216 return fEnvironment; 217 } 218 219 228 public void setWorkingDirectory(String path) { 229 fWorkingDirectory = path; 230 } 231 232 240 public String getWorkingDirectory() { 241 return fWorkingDirectory; 242 } 243 244 251 public void setResumeOnStartup(boolean resume) { 252 fResume = resume; 253 } 254 255 263 public boolean isResumeOnStartup() { 264 return fResume; 265 } 266 } 267 | Popular Tags |