Package org.apache.storm.command
Class CLI
java.lang.Object
org.apache.storm.command.CLI
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final CLI.ParseParse function to return an Integer.static final CLI.ParseNoop parse function, returns the String.static final CLI.AssocFirst occurrence on the command line is the resulting value.static final CLI.AssocAll values are returned as a List.static final CLI.AssocAll values are returned as a map.static final CLI.AssocLast occurrence on the command line is the resulting value.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic CLI.CLIBuilderAdd a named argument.static CLI.CLIBuilderAdd a named argument.static CLI.CLIBuilderAdd a named argument.static CLI.CLIBuilderAdd a named argument.static CLI.CLIBuilderAdd a boolean option that enables something.static CLI.CLIBuilderAdd an option to be parsed.static CLI.CLIBuilderAdd an option to be parsed.static CLI.CLIBuilderAdd an option to be parsed.static CLI.CLIBuilderoptionalArg(String name) Add a named argument that is optional.static CLI.CLIBuilderoptionalArg(String name, CLI.Assoc assoc) Add a named argument that is optional.static CLI.CLIBuilderoptionalArg(String name, CLI.Parse parse) Add a named argument that is optional.static CLI.CLIBuilderoptionalArg(String name, CLI.Parse parse, CLI.Assoc assoc) Add a named argument that is optional.
- 
Field Details- 
AS_INTParse function to return an Integer.
- 
AS_STRINGNoop parse function, returns the String.
- 
LAST_WINSLast occurrence on the command line is the resulting value.
- 
FIRST_WINSFirst occurrence on the command line is the resulting value.
- 
INTO_LISTAll values are returned as a List.
- 
INTO_MAPAll values are returned as a map.
 
- 
- 
Constructor Details- 
CLIpublic CLI()
 
- 
- 
Method Details- 
optAdd an option to be parsed.- Parameters:
- shortName- the short single character name of the option (no `-` character proceeds it).
- longName- the multi character name of the option (no `--` characters proceed it).
- defaultValue- the value that will be returned of the command if none is given. null if none is given.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optpublic static CLI.CLIBuilder opt(String shortName, String longName, Object defaultValue, CLI.Parse parse) Add an option to be parsed.- Parameters:
- shortName- the short single character name of the option (no `-` character proceeds it).
- longName- the multi character name of the option (no `--` characters proceed it).
- defaultValue- the value that will be returned of the command if none is given. null if none is given.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optpublic static CLI.CLIBuilder opt(String shortName, String longName, Object defaultValue, CLI.Parse parse, CLI.Assoc assoc) Add an option to be parsed.- Parameters:
- shortName- the short single character name of the option (no `-` character proceeds it).
- longName- the multi character name of the option (no `--` characters proceed it).
- defaultValue- the value that will be returned of the command if none is given. null if none is given.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- assoc- an association command to decide what to do if the option appears multiple times. If null LAST_WINS is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
boolOptAdd a boolean option that enables something.- Parameters:
- shortName- the short single character name of the option (no `-` character proceeds it).
- longName- the multi character name of the option (no `--` characters proceed it).
- Returns:
- a builder to be used to continue creating the command line.
 
- 
argAdd a named argument.- Parameters:
- name- the name of the argument.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
argAdd a named argument.- Parameters:
- name- the name of the argument.
- assoc- an association command to decide what to do if the argument appears multiple times. If null INTO_LIST is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
argAdd a named argument.- Parameters:
- name- the name of the argument.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
argAdd a named argument.- Parameters:
- name- the name of the argument.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- assoc- an association command to decide what to do if the argument appears multiple times. If null INTO_LIST is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optionalArgAdd a named argument that is optional.- Parameters:
- name- the name of the argument.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optionalArgAdd a named argument that is optional.- Parameters:
- name- the name of the argument.
- assoc- an association command to decide what to do if the argument appears multiple times. If null INTO_LIST is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optionalArgAdd a named argument that is optional.- Parameters:
- name- the name of the argument.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- Returns:
- a builder to be used to continue creating the command line.
 
- 
optionalArgAdd a named argument that is optional.- Parameters:
- name- the name of the argument.
- parse- an optional function to transform the string to something else. If null a NOOP is used.
- assoc- an association command to decide what to do if the argument appears multiple times. If null INTO_LIST is used.
- Returns:
- a builder to be used to continue creating the command line.
 
 
-