Skip to content

Commit 6c1f4e9

Browse files
committed
ConsoleUtils: Document parseParameterString
1 parent 8e1a522 commit 6c1f4e9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,36 @@
4747
*/
4848
public final class ConsoleUtils {
4949

50+
/**
51+
* @see #parseParameterString(String, ModuleInfo, LogService)
52+
*/
5053
public static Map<String, Object> parseParameterString(final String parameterString) {
5154
return parseParameterString(parameterString, (CommandInfo)null);
5255
}
5356

57+
/**
58+
* @see #parseParameterString(String, ModuleInfo, LogService)
59+
*/
5460
public static Map<String, Object> parseParameterString(final String parameterString, final ModuleInfo info) {
5561
return parseParameterString(parameterString, info, null);
5662
}
5763

64+
/**
65+
* @see #parseParameterString(String, ModuleInfo, LogService)
66+
*/
5867
public static Map<String, Object> parseParameterString(final String parameterString, final LogService logService) {
5968
return parseParameterString(parameterString, null, logService);
6069
}
6170

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+
*/
6280
public static Map<String, Object> parseParameterString(final String parameterString, final ModuleInfo info, final LogService logService) {
6381
final Map<String, Object> inputMap = new HashMap<String, Object>();
6482

0 commit comments

Comments
 (0)