| Constructor and Description |
|---|
CommandBuilder(CommandBuilder delegate) |
| Modifier and Type | Method and Description |
|---|---|
Command |
build()
Build the command
|
static CommandBuilder |
command(CLI cli)
Create a new commmand with its
CLI descriptor. |
static CommandBuilder |
command(String name)
Create a new commmand builder, the command is responsible for managing the options and arguments via the
#args() arguments. |
CommandBuilder |
completionHandler(Handler<Completion> handler)
Set the command completion handler, the completion handler when the user asks for contextual command line
completion, usually hitting the tab key.
|
Object |
getDelegate() |
static CommandBuilder |
newInstance(CommandBuilder arg) |
CommandBuilder |
processHandler(Handler<CommandProcess> handler)
Set the command process handler, the process handler is called when the command is executed.
|
public CommandBuilder(CommandBuilder delegate)
public Object getDelegate()
public static CommandBuilder command(String name)
#args() arguments.name - the command namepublic static CommandBuilder command(CLI cli)
CLI descriptor. This command can then retrieve the parsed
CommandProcess.commandLine() when it executes to know get the command arguments and options.cli - the cli to usepublic CommandBuilder processHandler(Handler<CommandProcess> handler)
handler - the process handlerpublic CommandBuilder completionHandler(Handler<Completion> handler)
handler - the completion handlerpublic Command build()
public static CommandBuilder newInstance(CommandBuilder arg)
Copyright © 2015. All rights reserved.