Browse Source

Make Command an interface

pull/727/head
Chris Smith 7 years ago
parent
commit
f4784c4130

+ 1
- 1
src/main/java/com/dmdirc/commandparser/commands/BaseCommand.java View File

36
 /**
36
 /**
37
  * Represents a generic command.
37
  * Represents a generic command.
38
  */
38
  */
39
-public abstract class BaseCommand extends Command {
39
+public abstract class BaseCommand implements Command {
40
 
40
 
41
     /** The controller this command is associated with. */
41
     /** The controller this command is associated with. */
42
     private final CommandController controller;
42
     private final CommandController controller;

+ 3
- 7
src/main/java/com/dmdirc/commandparser/commands/Command.java View File

29
 import javax.annotation.Nonnull;
29
 import javax.annotation.Nonnull;
30
 
30
 
31
 /**
31
 /**
32
- * @deprecated Use {@link BaseCommand} directly.
32
+ * A command responds to user-input in a text field.
33
  */
33
  */
34
-@Deprecated
35
-public abstract class Command {
34
+public interface Command {
36
 
35
 
37
     /**
36
     /**
38
      * Executes this command.
37
      * Executes this command.
40
      * @param origin  The container which received the command
39
      * @param origin  The container which received the command
41
      * @param args    Arguments passed to this command
40
      * @param args    Arguments passed to this command
42
      * @param context The context the command was executed in
41
      * @param context The context the command was executed in
43
-     *
44
-     * @since 0.6.4
45
      */
42
      */
46
-    public abstract void execute(@Nonnull WindowModel origin, CommandArguments args,
47
-                                 CommandContext context);
43
+    void execute(@Nonnull WindowModel origin, CommandArguments args, CommandContext context);
48
 
44
 
49
 }
45
 }

Loading…
Cancel
Save