SandMark version 2.0


sandmark
Class CLI

java.lang.Object
  |
  +--sandmark.CLI
Direct Known Subclasses:
Console

class CLI
extends java.lang.Object

The sandmark.CLI class contains common code shared by the command-line interfaces and is the superclass of those classes.

Author:
Christian Collberg

Constructor Summary
(package private) CLI()
           
 
Method Summary
(package private) static void abort(java.lang.String s)
          Aborts a batch-mode program with an error message.
(package private) static void abort(java.lang.Throwable t)
          Aborts a batch-mode program in response to a caught exception.
(package private) static void printUsage(java.lang.Class mainclass, java.lang.String[] speclist, java.lang.String[] arglist)
           
(package private) static java.util.Properties setup(java.lang.Class mainclass, java.lang.String[] speclist, java.lang.String[] arglist)
          Called from the main class to initialize things and process arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLI

CLI()
Method Detail

setup

static java.util.Properties setup(java.lang.Class mainclass,
                                  java.lang.String[] speclist,
                                  java.lang.String[] arglist)
Called from the main class to initialize things and process arguments. Arguments are processed under control of a specification list, which is an array of strings interpreted in groups of three. Each group specifies one argument, and contains:

Parameters:
mainclass -
speclist -
arglist -
Returns:
a list of properties

printUsage

static void printUsage(java.lang.Class mainclass,
                       java.lang.String[] speclist,
                       java.lang.String[] arglist)
Parameters:
mainclass -
speclist -
arglist -

abort

static void abort(java.lang.String s)
Aborts a batch-mode program with an error message.

Parameters:
s -

abort

static void abort(java.lang.Throwable t)
Aborts a batch-mode program in response to a caught exception. If the exception is a simple unsubclassed java.lang.Error, it is assumed to be a deliberate abort; otherwise, a stack trace is dumped to stderr.

Parameters:
t -

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002