Package com.netflix.genie.agent.cli
Class Util
java.lang.Object
com.netflix.genie.agent.cli.Util
CLI utility methods.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
getOperandArguments
(String[] args) Get a subset of argument after the double dash (a.k.a.static String[]
getOptionArguments
(String[] args) Get a subset of arguments before the double dash (a.k.a.static String[]
mangleBareDoubleDash
(String[] args) Replace all "bare double dash" arguments in the input array.static String[]
unmangleBareDoubleDash
(String[] args) Restore "bare double dash" arguments in the input array.
-
Method Details
-
mangleBareDoubleDash
Replace all "bare double dash" arguments in the input array.- Parameters:
args
- the arguments array- Returns:
- a new array with bare double dashes replaced by a special marker
-
unmangleBareDoubleDash
Restore "bare double dash" arguments in the input array.- Parameters:
args
- the arguments array with where double dashes were replaced- Returns:
- a new array with bare double dashes restored in place of the special marker
-
getOptionArguments
Get a subset of arguments before the double dash (a.k.a. options).- Parameters:
args
- the raw array of arguments- Returns:
- an array of arguments. Possibly empty, possibly the same as the input array.
-
getOperandArguments
Get a subset of argument after the double dash (a.k.a. operands)- Parameters:
args
- the raw array of arguments- Returns:
- an array of arguments. Possibly empty
-