|
39 | 39 | import org.scijava.log.LogService; |
40 | 40 | import org.scijava.module.ModuleInfo; |
41 | 41 | import org.scijava.module.ModuleItem; |
| 42 | +import org.scijava.parse.ParseService; |
42 | 43 |
|
43 | | -/** |
44 | | - * Helper class for {@link ConsoleArgument}s. |
45 | | - * |
46 | | - * @author Mark Hiner |
47 | | - */ |
| 44 | +/** @deprecated Use alternatives instead (see individual method docs). */ |
| 45 | +@Deprecated |
48 | 46 | public final class ConsoleUtils { |
49 | 47 |
|
50 | | - /** |
51 | | - * @see #parseParameterString(String, ModuleInfo, LogService) |
52 | | - */ |
| 48 | + /** @deprecated Use {@link ParseService} instead. */ |
| 49 | + @Deprecated |
53 | 50 | public static Map<String, Object> parseParameterString(final String parameterString) { |
54 | 51 | return parseParameterString(parameterString, (CommandInfo)null); |
55 | 52 | } |
56 | 53 |
|
57 | | - /** |
58 | | - * @see #parseParameterString(String, ModuleInfo, LogService) |
59 | | - */ |
| 54 | + /** @deprecated Use {@link ParseService} instead. */ |
| 55 | + @Deprecated |
60 | 56 | public static Map<String, Object> parseParameterString(final String parameterString, final ModuleInfo info) { |
61 | 57 | return parseParameterString(parameterString, info, null); |
62 | 58 | } |
63 | 59 |
|
64 | | - /** |
65 | | - * @see #parseParameterString(String, ModuleInfo, LogService) |
66 | | - */ |
| 60 | + /** @deprecated Use {@link ParseService} instead. */ |
| 61 | + @Deprecated |
67 | 62 | public static Map<String, Object> parseParameterString(final String parameterString, final LogService log) { |
68 | 63 | return parseParameterString(parameterString, null, log); |
69 | 64 | } |
70 | 65 |
|
71 | | - /** |
72 | | - * Helper method for turning a parameter string into a {@code Map} of |
73 | | - * key:value pairs. If a {@link ModuleInfo} is provided, the parameter |
74 | | - * string is assumed to be a comma-separated list of values, ordered |
75 | | - * according to the {@code ModuleInfo's} inputs. Otherwise, the parameter |
76 | | - * string is assumed to be a comma-separated list of "key=value" pairs. |
77 | | - * |
78 | | - * TODO reconcile with attribute parsing of {@link ScriptInfo} |
79 | | - */ |
| 66 | + /** @deprecated Use {@link ParseService} instead. */ |
| 67 | + @Deprecated |
80 | 68 | public static Map<String, Object> parseParameterString(final String parameterString, final ModuleInfo info, final LogService log) { |
81 | 69 | final Map<String, Object> inputMap = new HashMap<String, Object>(); |
82 | 70 |
|
@@ -104,12 +92,10 @@ else if (log != null) |
104 | 92 | } |
105 | 93 |
|
106 | 94 | /** |
107 | | - * Test if the next argument is an appropriate parameter to a |
108 | | - * {@link ConsoleArgument}. |
109 | | - * |
110 | | - * @return {@code true} if the first argument of the given list does not |
111 | | - * start with a {@code '-'} character. |
| 95 | + * @deprecated Use {@link AbstractConsoleArgument#getParam(LinkedList)} |
| 96 | + * instead. |
112 | 97 | */ |
| 98 | + @Deprecated |
113 | 99 | public static boolean hasParam(final LinkedList<String> args) { |
114 | 100 | return !(args.isEmpty() || args.getFirst().startsWith("-")); |
115 | 101 | } |
|
0 commit comments