de.goerntkai.toolbox.cmdln
Interface CommandLine


public interface CommandLine

Represents a command line as given by the user to start the application.

The commando itself is the first thing entered in the command line. It is followed by options and arguments.

Version:
$Id: CommandLine.java,v 1.9 2007/05/01 17:08:22 GoerntKai Exp $
Author:
Kai Görnt

Method Summary
 java.lang.String getCommando()
          Returns the commando.
 java.lang.String[] getHelpText()
          Returns the text of the help document.
 CommandLineParameter getParameter(java.lang.String theName)
          Returns the command line parameter with the given name.
 boolean isValid()
          Returns true when the given command line was valid, false otherwise.
 

Method Detail

getCommando

public java.lang.String getCommando()

Returns the commando.

Postconditions
result != null

Returns:
the commando

getHelpText

public java.lang.String[] getHelpText()

Returns the text of the help document. In case of an invalid command line the help text should begin with the command line followed by the mistakes.

Postconditions
result != null

Returns:
the text of the help document

getParameter

public CommandLineParameter getParameter(java.lang.String theName)

Returns the command line parameter with the given name.

Preconditions
theName != null
Postconditions
result != null

Parameters:
theName - of the command line parameter to get
Returns:
the command line parameter

isValid

public boolean isValid()

Returns true when the given command line was valid, false otherwise.

Returns:
wether the command line is valid


Copyright © 2004-2007 Kai Görnt. All Rights Reserved.