summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/cli/Command.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2017-03-26 11:30:43 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2017-03-26 11:30:43 -0400
commit98cdf435d4974f4cca8f7b4eb4026da2c88cbc4c (patch)
treece5edea29a4da719affe61afda30a50afae15e87 /BJC-Utils2/src/main/java/bjc/utils/cli/Command.java
parentb53c1ef47c438fb1144b961d1939c37a4bfe9120 (diff)
Update
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/cli/Command.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/cli/Command.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/Command.java b/BJC-Utils2/src/main/java/bjc/utils/cli/Command.java
new file mode 100644
index 0000000..02bc061
--- /dev/null
+++ b/BJC-Utils2/src/main/java/bjc/utils/cli/Command.java
@@ -0,0 +1,39 @@
+package bjc.utils.cli;
+
+/**
+ * Represents a command that can be invoked from a {@link CommandMode}
+ *
+ * @author ben
+ *
+ */
+public interface Command {
+ /**
+ * Create a command that serves as an alias to this one
+ *
+ * @return A command that serves as an alias to this one
+ */
+ Command aliased();
+
+ /**
+ * Get the handler that executes this command
+ *
+ * @return The handler that executes this command
+ */
+ CommandHandler getHandler();
+
+ /**
+ * Get the help entry for this command
+ *
+ * @return The help entry for this command
+ */
+ CommandHelp getHelp();
+
+ /**
+ * Check if this command is an alias of another command
+ *
+ * @return Whether or not this command is an alias of another
+ */
+ default boolean isAlias() {
+ return false;
+ }
+}