com.waveset.util
Class CommandProcess

java.lang.Object
  extended bycom.waveset.util.CommandProcess
Direct Known Subclasses:
Command

public class CommandProcess
extends java.lang.Object

Launches commands. In particular, sets up the classpath for the application. Otherwise, setting CLASSPATH exceeds Windows line length limits.

An instance of Command represents a command line interface (CLI). Each command is an alias to a fully-qualified class name, for which class we invoke the static main method.

The main method of this class launches a command specified as an input argument (either a command alias or a fully-qualified class name). If there is an error and return code of -1 is return or the specific error code if present otherwise 0.


Nested Class Summary
static interface CommandProcess.LineOption
          CLI option interface.
static class CommandProcess.LineOptionImpl
          Default implementation of the LineOption interface.
static interface CommandProcess.Register
          CLI option register
 
Field Summary
static java.lang.String code_id
           
static java.lang.Class[] MAINPARAMETER_TYPES
           
static java.lang.String[] NOARGS
           
 
Constructor Summary
CommandProcess()
           
 
Method Summary
 java.util.List getLineOptions()
          Returns all the register command line options..
static void main(java.lang.String[] args)
           
static void print(java.lang.Object o)
           
static void printException(java.lang.Throwable th)
           
static void println()
           
static void println(java.lang.Object o)
           
 void run(java.lang.String[] args)
           
 void usage()
          Print out usage statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

NOARGS

public static final java.lang.String[] NOARGS

MAINPARAMETER_TYPES

public static final java.lang.Class[] MAINPARAMETER_TYPES
Constructor Detail

CommandProcess

public CommandProcess()
Method Detail

getLineOptions

public java.util.List getLineOptions()
Returns all the register command line options..


usage

public void usage()
Print out usage statement.


println

public static void println()

println

public static void println(java.lang.Object o)

print

public static void print(java.lang.Object o)

printException

public static void printException(java.lang.Throwable th)

run

public void run(java.lang.String[] args)
         throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)