com.symbian.et.test.cmdline
Class CmdLineSet

java.lang.Object
  extended bycom.symbian.et.test.cmdline.CmdLineSet

public final class CmdLineSet
extends java.lang.Object

class that modelizes a group of commands, typically corresponds to a tool

Author:
EngineeringTools

Field Summary
private  java.util.ArrayList iCmds
           
private  org.apache.commons.cli.CommandLineParser iParser
           
 
Constructor Summary
CmdLineSet()
          standard constructor for users interested in using the ToolEnvironment class
 
Method Summary
 void add(CmdLine aCmd)
          add a command to a command set
 CmdLine find(java.lang.String aCommand)
          find a command in a command set given a command name
 void printCmds()
          print all the commands available (with a short description) for a particular command set
 void printCopyright()
          print the copyright notice associated to the command set
 void printToolName()
          print the name of the tool associated to the command set
 void printVersion()
          print the version of the tool associated to the command set
 java.lang.Object processCommand(java.lang.String[] aArgs)
          process a command
 void remove(CmdLine aCmd)
          remove a command from a command set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iCmds

private java.util.ArrayList iCmds

iParser

private org.apache.commons.cli.CommandLineParser iParser
Constructor Detail

CmdLineSet

public CmdLineSet()
standard constructor for users interested in using the ToolEnvironment class

Method Detail

printCmds

public void printCmds()
print all the commands available (with a short description) for a particular command set


processCommand

public java.lang.Object processCommand(java.lang.String[] aArgs)
                                throws CmdLineException
process a command

Parameters:
aArgs - array of parameters provided by the user
Returns:
result of hte processsed command
Throws:
CmdLineException - if command line is incorrect

find

public final CmdLine find(java.lang.String aCommand)
find a command in a command set given a command name

Parameters:
aCommand - command name to find
Returns:
A commandline.

add

public void add(CmdLine aCmd)
add a command to a command set

Parameters:
aCmd - command to add

remove

public void remove(CmdLine aCmd)
remove a command from a command set

Parameters:
aCmd - command to remove

printVersion

public void printVersion()
print the version of the tool associated to the command set


printToolName

public void printToolName()
print the name of the tool associated to the command set


printCopyright

public void printCopyright()
print the copyright notice associated to the command set