VMCommandLine { @Pure @SuppressWarnings("static-method") public String[] getParameters() { return getCommandLineParameters(); } VMCommandLine(Class<?> classToLaunch, String... parameters);  VMCommandLine(String classToLaunch, String... parameters);  VMCommandLine(Class<?> classToLaunch, String[] optionDefinitions, String... parameters);  VMCommandLine(String classToLaunch, String[] optionDefinitions, String... parameters);  VMCommandLine(); @Pure static String getExecutableFilename(String name); @Pure static String getVMBinary(); @Inline(value = "VMCommandLine.launchVMWithClassPath(($1).getCanonicalName(), ($2), ($3))", imported = {VMCommandLine.class}, statementExpression = true) static Process launchVMWithClassPath(Class<?> classToLaunch, String classpath,
			String... additionalParams); @SuppressWarnings({"checkstyle:magicnumber"}) static Process launchVMWithClassPath(String classToLaunch, String classpath,
			String... additionalParams); @Inline(value = "VMCommandLine.launchVMWithClassPath(($1).getCanonicalName(), ($2), ($3))", imported = {VMCommandLine.class}, statementExpression = true) static Process launchVMWithClassPath(Class<?> classToLaunch, File[] classpath,
			String... additionalParams); static Process launchVMWithClassPath(String classToLaunch, File[] classpath,
			String... additionalParams); @SuppressWarnings("checkstyle:magicnumber") static Process launchVMWithJar(File jarFile, String... additionalParams); @Inline(value = "VMCommandLine.launchVM(($1).getCanonicalName(), ($2))", imported = {VMCommandLine.class}, statementExpression = true) static Process launchVM(Class<?> classToLaunch, String... additionalParams); @Inline(value = "VMCommandLine.launchVMWithClassPath(($1), System.getProperty(\"java.class.path\"), ($2))", imported = {VMCommandLine.class}, statementExpression = true) static Process launchVM(String classToLaunch, String... additionalParams); @Inline(value = "VMCommandLine.saveVMParameters((($1) != null) ? ($1).getCanonicalName() : null, ($2))", imported = {VMCommandLine.class}, statementExpression = true) static void saveVMParameters(Class<?> classToLaunch, String... parameters); static void saveVMParameters(String classToLaunch, String... parameters); @Inline(value = "VMCommandLine.saveVMParametersIfNotSet(($1).getCanonicalName(), ($2))", imported = {VMCommandLine.class}, statementExpression = true) static void saveVMParametersIfNotSet(Class<?> classToLaunch, String... parameters); static void saveVMParametersIfNotSet(String classToLaunch, String... parameters); static Process relaunchVM(); @Pure @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) static String[] getAllCommandLineParameters(); @Pure static String[] getCommandLineParameters(); static String shiftCommandLineParameters(); @Pure static Map<String, List<Object>> getCommandLineOptions(); @Pure static List<Object> getCommandLineOption(String name); @Pure static boolean hasCommandLineOption(String name); @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "npathcomplexity"}) static void splitOptionsAndParameters(String... optionDefinitions); @Pure @SuppressWarnings("static-method") boolean hasOption(String optionLabel); @Pure @SuppressWarnings("static-method") Object getFirstOptionValue(String optionLabel); @Pure @SuppressWarnings("static-method") List<Object> getOptionValues(String optionLabel); @Pure @SuppressWarnings("static-method") String[] getParameters(); @SuppressWarnings("static-method") String shiftParameters(); @Pure @SuppressWarnings("static-method") int getParameterCount(); @Pure @SuppressWarnings("static-method") String getParameterAt(int index); @Pure @SuppressWarnings("static-method") boolean isParameterExists(int index);  }
@Test public void testVMCommandLineClassOfQStringArray() { VMCommandLine c = new VMCommandLine(VMCommandLineTest.class, commandLine); assertTrue(Arrays.equals(commandLine, c.getParameters())); }
@Test public void vmCommandLineClassOfQStringArrayStringArray() { VMCommandLine c = new VMCommandLine(VMCommandLineTest.class, optionDefinitions, commandLine); assertTrue(Arrays.equals(new String[] { "clean", "package", "installters", "-v" }, c.getParameters())); }
@Test public void getParameters() { VMCommandLine c = new VMCommandLine(VMCommandLineTest.class, optionDefinitions, commandLine); assertNotSame(commandLine, c.getParameters()); assertTrue(Arrays.equals(new String[] { "clean", "package", "installters", "-v" }, c.getParameters())); }