Class OutputFactory
Object
OutputFactory
SelectParam<Path> factory for outputs.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic SelectParam<Optional<Path>> pathOrDirectory(String[] arguments, boolean writeIntoRoot) Creates aSelectParamfor output paths or directories.
-
Method Details
-
pathOrDirectory
public static SelectParam<Optional<Path>> pathOrDirectory(String[] arguments, boolean writeIntoRoot) Creates aSelectParamfor 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 parsewriteIntoRoot- whether to write directly into an output directory's root (in which case a directory must be selected)- Returns:
- a
SelectParamfor optionalPath. - Throws:
CommandLineException- if invalid arguments were passed
-