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