public class TerminalInvoker extends Object
UsageException
and ExecutionException
will be treated
specially (a sanitised error message without stacktrace will be
presented to the user).Constructor and Description |
---|
TerminalInvoker(String toolname,
Map<String,Task> taskmap)
Creates a new invoker based on the given class with a given name.
|
Modifier and Type | Method and Description |
---|---|
static String |
getTaskUsage(Task task)
Returns a usage string for a given task.
|
void |
invoke(String[] args)
Invokes a method from this TerminalInvoker's class.
|
public TerminalInvoker(String toolname, Map<String,Task> taskmap)
toolname
- the name of this tool, used for user messagestaskmap
- map of task names to Task objectspublic void invoke(String[] args) throws Exception
args
- the arguments identifying what method to call and what
arguments to pass to itException
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.