Package org.wildfly.plugin.tools.cli

## Class ForkedCLIUtil

- java.lang.Object
- - org.wildfly.plugin.tools.cli.ForkedCLIUtil

-     public class ForkedCLIUtil
      extends Object

  A utility for forking a CLI process.
  Author:
    jdenise, James R. Perkins

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ForkedCLIUtil()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `fork​(String[] artifacts, Class<?> clazz, Path home, Path output, String... args)` | Forks a CLI process.
    `static void` | `fork​(Collection<String> artifacts, Class<?> clazz, Path home, Path output, String... args)` | Forks a CLI process.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ForkedCLIUtil

          public ForkedCLIUtil()

  - ### Method Detail

    - #### fork

          public static void fork​(String[] artifacts,
                                  Class<?> clazz,
                                  Path home,
                                  Path output,
                                  String... args)
                           throws IOException

      Forks a CLI process.
      Parameters:
        `artifacts` - the artifacts to add to the class path
        `clazz` - the class to invoke
        `home` - the home directory, this is always the first argument
        `output` - the path to the output file for the process
        `args` - any additional arguments to send add to the call
      Throws:
        `IOException` - if an error occurs create the process

    - #### fork

          public static void fork​(Collection<String> artifacts,
                                  Class<?> clazz,
                                  Path home,
                                  Path output,
                                  String... args)
                           throws IOException

      Forks a CLI process.
      Parameters:
        `artifacts` - the artifacts to add to the class path
        `clazz` - the class to invoke
        `home` - the home directory, this is always the first argument
        `output` - the path to the output file for the process
        `args` - any additional arguments to send add to the call
      Throws:
        `IOException` - if an error occurs create the process