Class LaunchHelpDispatcher
java.lang.Object
za.co.wethinkcode.robots.cli.help.LaunchHelpDispatcher
Detects and handles the top-level
help CLI command.
Usage from the built jars:
help— shows launch help for both server and clienthelp server— shows launch help for the server onlyhelp client— shows launch help for the client only
-h/--help, which
documents flags for a single already-selected program. This command
documents how to launch either program in the first place, and is
consulted before CliParser ever sees
the arguments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisHelpInvocation(String[] args) Builds the help text for the given invocation.
-
Constructor Details
-
LaunchHelpDispatcher
public LaunchHelpDispatcher() -
LaunchHelpDispatcher
-
-
Method Details
-
isHelpInvocation
- Parameters:
args- the raw args passed to a main method- Returns:
- true if the first argument is the
helpcommand
-
render
Builds the help text for the given invocation.- Parameters:
args- the raw args passed to a main method; args[0] is expected to be "help", with an optional args[1] of "server"/"client"- Returns:
- the formatted help text, ready to print
-