net.sf.tomp.xtcl.command
Class Echo

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.Echo
All Implemented Interfaces:
Command

public class Echo
extends AbstractCommand

Prints a String to Context's stdout

Author:
tomp

Field Summary
protected  java.lang.String echo
          String to be printed
 
Constructor Summary
Echo()
           
 
Method Summary
 int execute(Context c)
          Echo the String echo
 void setEcho(java.lang.String c)
          Sets the String to be echoed.
 java.lang.String toString()
           
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

echo

protected java.lang.String echo
String to be printed

Constructor Detail

Echo

public Echo()
Method Detail

setEcho

public void setEcho(java.lang.String c)
Sets the String to be echoed.

Parameters:
c - DOCUMENT ME!

execute

public int execute(Context c)
            throws java.lang.Exception
Echo the String echo

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
c - Context this command will be executed in.
Returns:
always 0 == success, OK
Throws:
java.lang.Exception - only if I/O error occurs when reporting the result to user.
See Also:
Command.execute(net.sf.tomp.xtcl.Context)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"ECHO " + echo;


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.