You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sets a customer to be called for each command entered
the consumer
ShellCliBuilder
build()
build the CLI
-
CLI
OptBuilder
The API is entered by calling Opt.useChar(char opt) or Opt.useName(String name).
Method
Description
Parameter
Return
shortId(char id)
sets a short option identifier
a character to be set as the identifier
OptBuilder
longId(String id)
sets a long name identifier
a string to be set as the iddentifier
OptBuilder
addArg(Arg arg)
add an argument blueprint
argument blueprint to add
OptBuilder
addArgs(Arg... args)
add several argument blueprints
argument blueprints to add
OptBuilder
description(String description)
sets the description of the option
the description string
OptBuilder
required()
marks the option as mandatory
-
OptBuilder
build()
build the option blueprint
-
Opt
ArgBuilder
The API is entered by calling Arg.of(Class<?> clazz).
Method
Description
Parameter
Return
placeholder(String placeholder)
sets a placeholder text
ArgBuilder
description(String description)
sets a description text
ArgBuilder
build()
build the argument blueprint
-
Arg
CmdBuilder
The API is entered by calling Cmd.useName(String name).
Method
Description
Parameter
Return
description(String description)
sets a description text
the description
CmdBuilder
addOpt(Opt opt)
add an option blueprint
option blueprint to add
CmdBuilder
addOpts(Opt... opts)
add several option blueprints
option blueprints to add
CmdBuilder
addArg(Arg arg)
add an argument blueprint
argument blueprint to add
CmdBuilder
addArgs(Arg... args)
add several argument blueprints
argument blueprints to add
CmdBuilder
consumer(Consumer<Command> consumer)
sets a consumer to be called for the given command
the consumer
CmdBuilder
build()
build the command blueprint
-
Cmd
The Result object Result
Method
Description
Parameter
Return
hasOptions()
gets a value determine whether the result contains user options
-
boolean
getOptions()
gets a list of parsed user options
-
List<Option>
hasArguments()
gets a value determine whether the result contains parsed arguments
-
boolean
getArguments()
gets a list of parsed user arguments
-
List<Argument<?>>
isCommand()
gets a value determine whether the given result has parsed a command; if true, hasOptions() and hasArguments() is false but the Command can contain its own options and arguments.
-
boolean
getCommand
gets the parsed user command
-
Command
Command
Method
Description
Parameter
Return
getBlueprint()
gets the corresponding blueprint object
-
Cmd
hasOptions()
gets a value determine whether the command contains options
-
boolean
getOptions()
gets the options parsed with the given command
-
List<Option>
hasArguments()
gets a value determine whether the command contains arguments
-
boolean
getArguments()
gets the arguemnts parsed with the given command
-
List<Argument<?>>
Option
Method
Description
Parameter
Return
getBlueprint()
gets the corresponding blueprint object
-
Opt
getId()
gets the identifier string
-
String
hasArguments()
gets a value determine whether the option contains arguments