edu.nmu.os.shell
Class CommandLineImpl

java.lang.Object
  |
  +--edu.nmu.os.shell.CommandLineImpl
All Implemented Interfaces:
CommandLine

public class CommandLineImpl
extends java.lang.Object
implements CommandLine

Represents a shell command line

TODO: man page

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

Constructor Summary
CommandLineImpl()
          Creates a new CommandLineImpl
CommandLineImpl(java.lang.String s)
          Creates a new CommandLineImpl from the given String
 
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
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandLineImpl

public CommandLineImpl()
Creates a new CommandLineImpl


CommandLineImpl

public CommandLineImpl(java.lang.String s)
Creates a new CommandLineImpl from the given String

Parameters:
s - the String from which to construct this CommandLineImpl
Method Detail

isComplete

public boolean isComplete()
Description copied from interface: CommandLine
Determines whether or not the CommandLine is syntactically complete

Specified by:
isComplete in interface CommandLine
Returns:
true if it is complete, false otherwise

append

public void append(java.lang.String s)
Description copied from interface: CommandLine
Appends the given String to the CommandLine

Specified by:
append in interface CommandLine
Parameters:
s - the String to be appended

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCommands

public Command[] getCommands()
                      throws java.io.IOException
Description copied from interface: CommandLine
Generates Commands from the CommandLine

Specified by:
getCommands in interface CommandLine
Returns:
the Commands
java.io.IOException

getUnresolved

public java.lang.String[] getUnresolved()
Description copied from interface: CommandLine
Returns the names of any unresolvable programs

Specified by:
getUnresolved in interface CommandLine
Returns:
the names

isExit

public boolean isExit()
Description copied from interface: CommandLine
Determines whether or not the CommandLine should exit the current Shell

Specified by:
isExit in interface CommandLine
Returns:
true if the ShellImpl should exit, false otherwise