public class LineInvoker
extends java.lang.Object
LineTableEnvironment.| Constructor | Description |
|---|---|
LineInvoker(java.lang.String toolName,
uk.ac.starlink.util.ObjectFactory<uk.ac.starlink.task.Task> taskFactory) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
getParamHelp(TableEnvironment env,
java.lang.String taskName,
uk.ac.starlink.task.Parameter param) |
Returns a help string for a parameter of one of the tasks known
to this application.
|
static java.lang.String |
getPrefixedParameterUsage(uk.ac.starlink.task.Parameter[] params,
java.lang.String prefix) |
Returns a usage string for a set of parameters,
prefixed by a given string.
|
static java.lang.String |
getStackSummary(java.lang.Throwable error) |
Returns a truncated version of a stack trace for user consumption.
|
static java.lang.String |
getUnusedWarning(java.lang.String[] unused) |
Returns a warning string appropriate for the case when one or more
words on the command line are never used by a task.
|
int |
invoke(java.lang.String[] args) |
Invokes one of the known tasks given a string of command-line words.
|
public LineInvoker(java.lang.String toolName,
uk.ac.starlink.util.ObjectFactory<uk.ac.starlink.task.Task> taskFactory)
toolName - name of the overall applicationtaskFactory - factory which can create the tasks known to
the applicationpublic int invoke(java.lang.String[] args)
args string will typically come straight out of
a static main() method.args - argument listpublic static java.lang.String getStackSummary(java.lang.Throwable error)
error - exception to summarisepublic static java.lang.String getPrefixedParameterUsage(uk.ac.starlink.task.Parameter[] params,
java.lang.String prefix)
params - parameter arrayprefix - string to prepend to the first linepublic static java.lang.String getParamHelp(TableEnvironment env, java.lang.String taskName, uk.ac.starlink.task.Parameter param)
env - execution environmenttaskName - task nickname - may be null if heading is not requiredparam - parameter for which usage information is requiredpublic static java.lang.String getUnusedWarning(java.lang.String[] unused)
unused - unused wordsCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.