Object
OutputFactory

public class OutputFactory extends Object
SelectParam<Path> factory for outputs.
Author:
Owen Feehan
  • Method Details

    • pathOrDirectory

      public static SelectParam<Optional<Path>> pathOrDirectory(String[] arguments, boolean writeIntoRoot)
      Creates a SelectParam for output paths or directories.

      If the argument is a path to a directory, then this directory is set as the default. Otherwise, the argument is treated like a path to BeanXML.

      Parameters:
      arguments - the command-line arguments to parse
      writeIntoRoot - whether to write directly into an output directory's root (in which case a directory must be selected)
      Returns:
      a SelectParam for optional Path.
      Throws:
      CommandLineException - if invalid arguments were passed