uk.ac.starlink.ttools.task
Class LineInvoker

java.lang.Object
  extended by uk.ac.starlink.ttools.task.LineInvoker

public class LineInvoker
extends Object

Invokes the Stilts tasks using a LineTableEnvironment.

Since:
15 Aug 2005
Author:
Mark Taylor

Constructor Summary
LineInvoker(String toolName, uk.ac.starlink.util.ObjectFactory taskFactory)
          Constructor.
 
Method Summary
static String getParamHelp(TableEnvironment env, 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 String getPrefixedTaskUsage(uk.ac.starlink.task.Task task, String prefix)
          Returns a usage string for a task, prefixed by a given string.
 int invoke(String[] args)
          Invokes one of the known tasks given a string of command-line words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineInvoker

public LineInvoker(String toolName,
                   uk.ac.starlink.util.ObjectFactory taskFactory)
Constructor.

Parameters:
toolName - name of the overall application
taskFactory - factory which can create the tasks known to the application
Method Detail

invoke

public int invoke(String[] args)
Invokes one of the known tasks given a string of command-line words. The args string will typically come straight out of a static main() method.

Parameters:
args - argument list

getPrefixedTaskUsage

public static String getPrefixedTaskUsage(uk.ac.starlink.task.Task task,
                                          String prefix)
Returns a usage string for a task, prefixed by a given string.

Parameters:
task - task object
prefix - string to prepend to the first line
Returns:
usage string

getParamHelp

public static String getParamHelp(TableEnvironment env,
                                  String taskName,
                                  uk.ac.starlink.task.Parameter param)
Returns a help string for a parameter of one of the tasks known to this application. May include extended usage information. Consider the result to be a formatted string, that is, one which contains newlines to keep line lengths down to a reasonable level.

Parameters:
env - execution environment
taskName - task nickname - may be null if heading is not required
param - parameter for which usage information is required
Returns:
usage message


Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.