public class ArgUtils extends Object
Simple arg parsing utility.
Modifier and Type | Field and Description |
---|---|
static String |
ARG_DEFAULT_VALUE
Default vaule for arguments withoug value
|
static String |
ARG_PARAM_FILE
Param file argument
If the param-file argument is set, its red as a property file
and each entry is treated as an argument value.
|
static String |
ARG_PREFIX
Prefix for all arguments
|
Constructor and Description |
---|
ArgUtils() |
Modifier and Type | Method and Description |
---|---|
static Properties |
getArgs(String[] args)
Parse an argument list as a property object.
|
static Properties |
getArgs(String[] args,
boolean checkParamFile)
Parse an argument list as a property object.
|
static Properties |
getArgs(String[] args,
boolean checkParamFile,
boolean priorityToParamFile)
Parse an argument list as a property object.
|
static String |
getArgString(String argName)
Create an argument string, ARG_PREFIX+argName.
|
public static final String ARG_PREFIX
public static final String ARG_DEFAULT_VALUE
public static final String ARG_PARAM_FILE
public static String getArgString(String argName)
Create an argument string, ARG_PREFIX+argName.
argName
- the name of the argumentpublic static Properties getArgs(String[] args, boolean checkParamFile)
Parse an argument list as a property object.
args
- command line argumentscheckParamFile
- true if param-file should be checked if the argument is set.public static Properties getArgs(String[] args, boolean checkParamFile, boolean priorityToParamFile)
Parse an argument list as a property object.
args
- command line argumentscheckParamFile
- true if param-file should be checked if the argument is set.priorityToParamFile
- true if param-file arguments should override command line argumentspublic static Properties getArgs(String[] args)
Parse an argument list as a property object.
param-file is checked by default at the end.
args
- command line argumentsCopyright © 2022 Fugerit. All rights reserved.