summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/cli/CLICommander.java3
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/cli/GenericCommand.java20
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");