edu.nmu.os.shell
Interface CommandLine

All Known Implementing Classes:
CommandLineImpl

public interface CommandLine

Represents a shell command line

A class implementing this interface is instantiated by the Shell. The Shell then uses the object to generate Commands from the Shell's InputStream.

Since:
jdk1.4
Version:
0.1, Jan 24, 2003 7:16:18 PM
Author:
Matt Murphy

Method Summary
 void append(java.lang.String s)
          Appends the given String to the CommandLine
 Command[] getCommands()
          Generates Commands from the CommandLine
 java.lang.String[] getUnresolved()
          Returns the names of any unresolvable programs
 boolean isComplete()
          Determines whether or not the CommandLine is syntactically complete
 boolean isExit()
          Determines whether or not the CommandLine should exit the current Shell
 

Method Detail

isComplete

public boolean isComplete()
Determines whether or not the CommandLine is syntactically complete

Returns:
true if it is complete, false otherwise

append

public void append(java.lang.String s)
Appends the given String to the CommandLine

Parameters:
s - the String to be appended

getCommands

public Command[] getCommands()
                      throws java.lang.Exception
Generates Commands from the CommandLine

Returns:
the Commands
Throws:
java.lang.Exception

getUnresolved

public java.lang.String[] getUnresolved()
Returns the names of any unresolvable programs

Returns:
the names

isExit

public boolean isExit()
Determines whether or not the CommandLine should exit the current Shell

Returns:
true if the ShellImpl should exit, false otherwise