Class LoginInterpreter

java.lang.Object
  extended byLoginInterpreter
All Implemented Interfaces:
InterpreterInterface

public class LoginInterpreter
extends Object
implements InterpreterInterface

Interpreter for Juno login commands. There are so few commands that if-then-else logic is OK.

Version:
10

Constructor Summary
LoginInterpreter(Juno system, OutputInterface console)
          Construct a new LoginInterpreter for interpreting login commands.
 
Method Summary
 void CLILogin()
          Simulates behavior at login: prompt.
 boolean interpret(String inputLine)
          Parse user's command line and dispatch appropriate semantic action.
 void setConsole(OutputInterface console)
          Set the console for this interpreter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginInterpreter

public LoginInterpreter(Juno system,
                        OutputInterface console)
Construct a new LoginInterpreter for interpreting login commands.

Parameters:
system - the system creating this interpreter.
console - the Terminal used for input and output.
Method Detail

CLILogin

public void CLILogin()
Simulates behavior at login: prompt.


interpret

public boolean interpret(String inputLine)
Parse user's command line and dispatch appropriate semantic action.

Specified by:
interpret in interface InterpreterInterface
Parameters:
inputLine - the User's instructions.
Returns:
true except for "exit" command or null inputLine.

setConsole

public void setConsole(OutputInterface console)
Set the console for this interpreter. Used by the creator of this interpreter.

Parameters:
console - the Terminal to be used for input and output.