Bläddra i källkod

Make Command an interface

pull/727/head
Chris Smith 7 år sedan
förälder
incheckning
f4784c4130

+ 1
- 1
src/main/java/com/dmdirc/commandparser/commands/BaseCommand.java Visa fil

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

+ 3
- 7
src/main/java/com/dmdirc/commandparser/commands/Command.java Visa fil

@@ -29,10 +29,9 @@ import com.dmdirc.interfaces.WindowModel;
29 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 37
      * Executes this command.
@@ -40,10 +39,7 @@ public abstract class Command {
40 39
      * @param origin  The container which received the command
41 40
      * @param args    Arguments passed to this command
42 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
 }

Laddar…
Avbryt
Spara