From ff597803c112e2b23f392b010e0604c9e1f0ffac Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 27 Sep 2021 13:46:35 -0700 Subject: [PATCH] Add Javadoc to the ProcessExecutor.launch(..) methods. --- .../tests/process/ProcessExecutor.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/process/ProcessExecutor.java b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/process/ProcessExecutor.java index 82a9f2d..4222779 100644 --- a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/process/ProcessExecutor.java +++ b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/process/ProcessExecutor.java @@ -51,14 +51,56 @@ public abstract class ProcessExecutor { protected static final String SPRING_DATA_GEMFIRE_SYSTEM_PROPERTY_PREFIX = "spring.data.gemfire."; protected static final String SPRING_GEMFIRE_SYSTEM_PROPERTY_PREFIX = "spring.gemfire."; + /** + * Launch (run) the given Java {@link Class} (program) passing in the given array of {@link Object arguments} + * to the program. + * + * @param type Java {@link Class} (program) to launch in a forked JVM process. + * @param args array of {@link Object} arguments to the pass to the Java program. + * @return a {@link ProcessWrapper} wrapping the Java {@link Process} representing the forked JVM. + * @throws IOException if the Java program could not be lauched (run). + * @see org.springframework.data.gemfire.tests.process.ProcessWrapper + * @see #launch(File, Class, String...) + * @see java.lang.Class + */ public static ProcessWrapper launch(Class type, String... args) throws IOException { return launch(FileSystemUtils.WORKING_DIRECTORY, type, args); } + /** + * Launch (run) the given Java {@link Class} (program) in the specified {@link File working directory} and pass in + * the given array of {@link Object arguments} to the program. + * + * @param type Java {@link Class} (program) to launch in a forked JVM process. + * @param workingDirectory {@link File} referring to the working directory of the forked JVM process. + * @param args array of {@link Object} arguments to the pass to the Java program. + * @return a {@link ProcessWrapper} wrapping the Java {@link Process} representing the forked JVM. + * @throws IOException if the Java program could not be lauched (run). + * @see org.springframework.data.gemfire.tests.process.ProcessWrapper + * @see #launch(File, String, Class, String...) + * @see java.lang.Class + * @see java.io.File + */ public static ProcessWrapper launch(File workingDirectory, Class type, String... args) throws IOException { return launch(workingDirectory, JAVA_CLASSPATH, type, args); } + /** + * Launch (run) the given Java {@link Class} (program) in the specified {@link File working directory}, using the + * given {@link String CLASSPATH} and pass in the given array of {@link Object arguments} to the program. + * + * @param type Java {@link Class} (program) to launch in a forked JVM process. + * @param workingDirectory {@link File} referring to the working directory of the forked JVM process. + * @param classpath {@link String} containing the classpath elements to pass to the JVM to run the Java program. + * @param args array of {@link Object} arguments to the pass to the Java program. + * @return a {@link ProcessWrapper} wrapping the Java {@link Process} representing the forked JVM. + * @throws IOException if the Java program could not be lauched (run). + * @see org.springframework.data.gemfire.tests.process.ProcessWrapper + * @see #buildCommand(String, Class, String...) + * @see java.lang.ProcessBuilder + * @see java.lang.Class + * @see java.io.File + */ public static ProcessWrapper launch(File workingDirectory, String classpath, Class type, String... args) throws IOException {