Class YmlMap
java.lang.Object
io.sbk.params.YmlMap
Helper base class for mapping YAML files to CLI argument arrays.
Subclasses represent the expected YAML structure. getYmlArgs(String, Class)
reads a YAML file into the given YmlMap subclass and converts its args
map into a String[] suitable for feeding into SBK's CLI parser.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull String[]getYmlArgs(String fileName, Class<? extends YmlMap> tClass) Read a YAML file and convert its args map into a CLI argument array.
-
Field Details
-
args
-
-
Constructor Details
-
YmlMap
-
-
Method Details
-
getYmlArgs
@NotNull public static @NotNull String[] getYmlArgs(String fileName, Class<? extends YmlMap> tClass) throws IOException Read a YAML file and convert its args map into a CLI argument array.- Parameters:
fileName- path to YAML filetClass- concreteYmlMapsubclass to deserialize into- Returns:
- array of CLI arguments (e.g., ["-option", "value", ...])
- Throws:
IOException- if the YAML file cannot be read or parsed
-