bookExamples.ch24Reflection
Class CommandLineInterpreter

java.lang.Object
  extended by bookExamples.ch24Reflection.CommandLineInterpreter
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class CommandLineInterpreter
extends java.lang.Object
implements java.awt.event.ActionListener


Constructor Summary
CommandLineInterpreter(java.lang.Object o)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void invokeMethodString(java.lang.String line)
           
 void runCommandLineInterpreter()
          commandLine - this should be improved using a queue of commands that are executed in a thread.
 void setInputStream(java.io.InputStream is)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineInterpreter

public CommandLineInterpreter(java.lang.Object o)
Method Detail

setInputStream

public void setInputStream(java.io.InputStream is)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

invokeMethodString

public void invokeMethodString(java.lang.String line)

runCommandLineInterpreter

public void runCommandLineInterpreter()
commandLine - this should be improved using a queue of commands that are executed in a thread. Thus the commandLine reader could just enqueue the commands for execution affineTransform a later time (when free cycles are available). As it is, a prompt does not appear until the command is finished. Worse, input is not accepted from the user, so no type-ahead is possible. Type-ahead should be possible, but I am not sure how to implement it. Suggestions? - DL