diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-03-16 08:45:18 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-03-16 08:45:18 -0400 |
| commit | df27066d09739190b1a007756045488a7d36faea (patch) | |
| tree | a76625d3ec88a49f2e40e7823f17de24bedbd6b7 /BJC-Utils2/src/main/java/bjc/utils | |
| parent | 022773e88ceb6256b90c92599d254df94c3d3190 (diff) | |
Formatting
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java | 3 | ||||
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java | 20 |
2 files changed, 15 insertions, 8 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java b/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java index 9fff1ac..719d6ca 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java @@ -96,7 +96,8 @@ public class CLICommander { if(currentMode.canHandle(currentLine)) { String[] commandTokens = currentLine.split(" "); String[] commandArgs = null; - int argCount = commandTokens.length; + + int argCount = commandTokens.length; /* * Parse args if they are present. diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java b/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java index 4dde938..a365135 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java @@ -1,27 +1,33 @@ package bjc.utils.cli; /** - * Generic command implementation + * Generic command implementation. * * @author ben * */ public class GenericCommand implements ICommand { - // The behavior for invoking the command + /* + * The behavior for invoking the command. + */ private ICommandHandler handler; - // The help for the command + /* + * The help for the command. + */ private ICommandHelp help; /** - * Create a new generic command + * Create a new generic command. * * @param handler - * The handler to use for the command + * The handler to use for the command. * @param description - * The description of the command. May be null + * The description of the command. May be null, in which case a default is + * provided. * @param help - * The detailed help message for the command. May be null + * The detailed help message for the command. May be null, in which case the + * description is repeated for the detailed help. */ public GenericCommand(ICommandHandler handler, String description, String help) { if(handler == null) throw new NullPointerException("Command handler must not be null"); |
