public class CommandLineUtils extends Object
| Constructor and Description |
|---|
CommandLineUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Environment |
argumentsToEnvironment(String[] args) |
static String |
getOption(String name,
String[] args) |
static String |
getOption(String name,
String[] args,
boolean defaultToSystemProperty,
boolean defaultToEnvironmentVariable) |
static String |
getOption(String name,
String[] args,
String defaultValue) |
static int |
getOptionAsInt(String name,
String[] args) |
static Path |
getOptionAsPath(String name,
String[] args) |
static Path |
getOptionAsPath(String name,
String[] args,
Path defaultValue) |
public static Environment argumentsToEnvironment(@Nonnull String[] args)
@Nonnull public static String getOption(@Nonnull String name, @Nonnull String[] args) throws NoSuchElementException
NoSuchElementException@Nullable public static String getOption(@Nonnull String name, @Nonnull String[] args, @Nullable String defaultValue) throws NoSuchElementException
NoSuchElementException@Nonnull public static Path getOptionAsPath(@Nonnull String name, @Nonnull String[] args) throws NoSuchElementException
NoSuchElementException@Nullable public static Path getOptionAsPath(@Nonnull String name, @Nonnull String[] args, @Nullable Path defaultValue) throws NoSuchElementException
NoSuchElementExceptionpublic static int getOptionAsInt(@Nonnull String name, @Nonnull String[] args) throws NoSuchElementException
NoSuchElementException@Nonnull public static String getOption(@Nonnull String name, @Nonnull String[] args, boolean defaultToSystemProperty, boolean defaultToEnvironmentVariable) throws NoSuchElementException
NoSuchElementExceptionCopyright © 2013. All Rights Reserved.