Skip to content

Commit 7d95887

Browse files
committed
ConsoleArgument: push default method impl to iface
1 parent a959e2b commit 7d95887

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/main/java/org/scijava/console/AbstractConsoleArgument.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ public boolean supports(final LinkedList<String> args) {
7070
return isFlag(args);
7171
}
7272

73-
@Override
74-
@SuppressWarnings({ "rawtypes", "unchecked" })
75-
public Class<LinkedList<String>> getType() {
76-
return (Class) String.class;
77-
}
73+
// -- Internal methods --
7874

7975
/**
8076
* Check if the given list of arguments starts with a flag that matches this

src/main/java/org/scijava/console/ConsoleArgument.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,11 @@ public interface ConsoleArgument extends HandlerPlugin<LinkedList<String>> {
5454
/** Handles the <em>front</em> of the given list of arguments. */
5555
void handle(final LinkedList<String> args);
5656

57+
// -- Typed methods --
58+
59+
@Override
60+
@SuppressWarnings({ "rawtypes", "unchecked" })
61+
default Class<LinkedList<String>> getType() {
62+
return (Class) String.class;
63+
}
5764
}

0 commit comments

Comments
 (0)