@Test public void testPermSizeDefaults() { final List<String> command = newBuilder() .build(); assertPermSizeSet(command, "128m", "128m"); }
@Override public List<String> build() { return new ArrayList<String>() {{ if (commandPrefixList != null) { for (final String cmd : commandPrefixList) { add(cmd); } } if (javaPath == null || javaPath.isEmpty()) { add(DEFAULT_JAVA_PATH); } else { add(javaPath); } if (assertionsEnabled != null && assertionsEnabled || EnvironmentUtils.areAssertionsEnabled()) { addOption("-ea"); } for (final JVMOption jvmOption : options.values()) { add(jvmOption.toString()); } if (classPath != null && !classPath.isEmpty()) { add("-classpath"); add(classPath); } propagateProperties(this, true, "proc_reef"); propagateProperties(this, false, "java.util.logging.config.file", "java.util.logging.config.class"); add(launcherClass.getName()); if (evaluatorConfigurationPaths.isPresent()) { for (final String configurationPath : evaluatorConfigurationPaths.get()) { add(configurationPath); } } if (stdoutPath != null && !stdoutPath.isEmpty()) { add("1>"); add(stdoutPath); } if (stderrPath != null && !stderrPath.isEmpty()) { add("2>"); add(stderrPath); } }}; }
JavaLaunchCommandBuilder implements LaunchCommandBuilder { @Override public List<String> build() { return new ArrayList<String>() {{ if (commandPrefixList != null) { for (final String cmd : commandPrefixList) { add(cmd); } } if (javaPath == null || javaPath.isEmpty()) { add(DEFAULT_JAVA_PATH); } else { add(javaPath); } if (assertionsEnabled != null && assertionsEnabled || EnvironmentUtils.areAssertionsEnabled()) { addOption("-ea"); } for (final JVMOption jvmOption : options.values()) { add(jvmOption.toString()); } if (classPath != null && !classPath.isEmpty()) { add("-classpath"); add(classPath); } propagateProperties(this, true, "proc_reef"); propagateProperties(this, false, "java.util.logging.config.file", "java.util.logging.config.class"); add(launcherClass.getName()); if (evaluatorConfigurationPaths.isPresent()) { for (final String configurationPath : evaluatorConfigurationPaths.get()) { add(configurationPath); } } if (stdoutPath != null && !stdoutPath.isEmpty()) { add("1>"); add(stdoutPath); } if (stderrPath != null && !stderrPath.isEmpty()) { add("2>"); add(stderrPath); } }}; } }
JavaLaunchCommandBuilder implements LaunchCommandBuilder { @Override public List<String> build() { return new ArrayList<String>() {{ if (commandPrefixList != null) { for (final String cmd : commandPrefixList) { add(cmd); } } if (javaPath == null || javaPath.isEmpty()) { add(DEFAULT_JAVA_PATH); } else { add(javaPath); } if (assertionsEnabled != null && assertionsEnabled || EnvironmentUtils.areAssertionsEnabled()) { addOption("-ea"); } for (final JVMOption jvmOption : options.values()) { add(jvmOption.toString()); } if (classPath != null && !classPath.isEmpty()) { add("-classpath"); add(classPath); } propagateProperties(this, true, "proc_reef"); propagateProperties(this, false, "java.util.logging.config.file", "java.util.logging.config.class"); add(launcherClass.getName()); if (evaluatorConfigurationPaths.isPresent()) { for (final String configurationPath : evaluatorConfigurationPaths.get()) { add(configurationPath); } } if (stdoutPath != null && !stdoutPath.isEmpty()) { add("1>"); add(stdoutPath); } if (stderrPath != null && !stderrPath.isEmpty()) { add("2>"); add(stderrPath); } }}; } JavaLaunchCommandBuilder();  JavaLaunchCommandBuilder(final List<String> commandPrefixList);  JavaLaunchCommandBuilder(final Class launcherClass, final List<String> commandPrefixList); }
JavaLaunchCommandBuilder implements LaunchCommandBuilder { @Override public List<String> build() { return new ArrayList<String>() {{ if (commandPrefixList != null) { for (final String cmd : commandPrefixList) { add(cmd); } } if (javaPath == null || javaPath.isEmpty()) { add(DEFAULT_JAVA_PATH); } else { add(javaPath); } if (assertionsEnabled != null && assertionsEnabled || EnvironmentUtils.areAssertionsEnabled()) { addOption("-ea"); } for (final JVMOption jvmOption : options.values()) { add(jvmOption.toString()); } if (classPath != null && !classPath.isEmpty()) { add("-classpath"); add(classPath); } propagateProperties(this, true, "proc_reef"); propagateProperties(this, false, "java.util.logging.config.file", "java.util.logging.config.class"); add(launcherClass.getName()); if (evaluatorConfigurationPaths.isPresent()) { for (final String configurationPath : evaluatorConfigurationPaths.get()) { add(configurationPath); } } if (stdoutPath != null && !stdoutPath.isEmpty()) { add("1>"); add(stdoutPath); } if (stderrPath != null && !stderrPath.isEmpty()) { add("2>"); add(stderrPath); } }}; } JavaLaunchCommandBuilder();  JavaLaunchCommandBuilder(final List<String> commandPrefixList);  JavaLaunchCommandBuilder(final Class launcherClass, final List<String> commandPrefixList); @Override List<String> build(); @Override @SuppressWarnings("checkstyle:hiddenfield") JavaLaunchCommandBuilder setMemory(final int megaBytes); @Override JavaLaunchCommandBuilder setConfigurationFilePaths(final List<String> configurationPaths); @Override JavaLaunchCommandBuilder setStandardOut(final String standardOut); @Override JavaLaunchCommandBuilder setStandardErr(final String standardErr); JavaLaunchCommandBuilder setJavaPath(final String path); JavaLaunchCommandBuilder setClassPath(final String classPath); JavaLaunchCommandBuilder setClassPath(final Collection<String> classPathElements); JavaLaunchCommandBuilder addOption(final String option); @SuppressWarnings("checkstyle:hiddenfield") JavaLaunchCommandBuilder enableAssertions(final boolean assertionsEnabled); }
JavaLaunchCommandBuilder implements LaunchCommandBuilder { @Override public List<String> build() { return new ArrayList<String>() {{ if (commandPrefixList != null) { for (final String cmd : commandPrefixList) { add(cmd); } } if (javaPath == null || javaPath.isEmpty()) { add(DEFAULT_JAVA_PATH); } else { add(javaPath); } if (assertionsEnabled != null && assertionsEnabled || EnvironmentUtils.areAssertionsEnabled()) { addOption("-ea"); } for (final JVMOption jvmOption : options.values()) { add(jvmOption.toString()); } if (classPath != null && !classPath.isEmpty()) { add("-classpath"); add(classPath); } propagateProperties(this, true, "proc_reef"); propagateProperties(this, false, "java.util.logging.config.file", "java.util.logging.config.class"); add(launcherClass.getName()); if (evaluatorConfigurationPaths.isPresent()) { for (final String configurationPath : evaluatorConfigurationPaths.get()) { add(configurationPath); } } if (stdoutPath != null && !stdoutPath.isEmpty()) { add("1>"); add(stdoutPath); } if (stderrPath != null && !stderrPath.isEmpty()) { add("2>"); add(stderrPath); } }}; } JavaLaunchCommandBuilder();  JavaLaunchCommandBuilder(final List<String> commandPrefixList);  JavaLaunchCommandBuilder(final Class launcherClass, final List<String> commandPrefixList); @Override List<String> build(); @Override @SuppressWarnings("checkstyle:hiddenfield") JavaLaunchCommandBuilder setMemory(final int megaBytes); @Override JavaLaunchCommandBuilder setConfigurationFilePaths(final List<String> configurationPaths); @Override JavaLaunchCommandBuilder setStandardOut(final String standardOut); @Override JavaLaunchCommandBuilder setStandardErr(final String standardErr); JavaLaunchCommandBuilder setJavaPath(final String path); JavaLaunchCommandBuilder setClassPath(final String classPath); JavaLaunchCommandBuilder setClassPath(final Collection<String> classPathElements); JavaLaunchCommandBuilder addOption(final String option); @SuppressWarnings("checkstyle:hiddenfield") JavaLaunchCommandBuilder enableAssertions(final boolean assertionsEnabled);  }