public final class ConsoleUtils extends Object
ConsoleArgument
s.Constructor and Description |
---|
ConsoleUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
hasParam(LinkedList<String> args)
Test if the next argument is an appropriate parameter to a
ConsoleArgument . |
static Map<String,Object> |
parseParameterString(String parameterString) |
static Map<String,Object> |
parseParameterString(String parameterString,
LogService logService) |
static Map<String,Object> |
parseParameterString(String parameterString,
ModuleInfo info) |
static Map<String,Object> |
parseParameterString(String parameterString,
ModuleInfo info,
LogService logService)
Helper method for turning a parameter string into a
Map of
key:value pairs. |
public static Map<String,Object> parseParameterString(String parameterString, ModuleInfo info)
public static Map<String,Object> parseParameterString(String parameterString, LogService logService)
public static Map<String,Object> parseParameterString(String parameterString, ModuleInfo info, LogService logService)
Map
of
key:value pairs. If a ModuleInfo
is provided, the parameter
string is assumed to be a comma-separated list of values, ordered
according to the ModuleInfo's
inputs. Otherwise, the parameter
string is assumed to be a comma-separated list of "key=value" pairs.
TODO reconcile with attribute parsing of ScriptInfo
public static boolean hasParam(LinkedList<String> args)
ConsoleArgument
.true
if the first argument of the given list does not
start with a '-'
character.Copyright © 2009–2016 SciJava. All rights reserved.