net.sf.tomp.xtcl.command
Class TryBlock

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.TryBlock
All Implemented Interfaces:
Command
Direct Known Subclasses:
Call

public class TryBlock
extends AbstractCommand

Executes the command within the TryBlock.

Author:
tomp

Field Summary
protected  Command command
          the command in this try-block
 
Constructor Summary
TryBlock()
           
 
Method Summary
 int execute(Context context)
          Executes the command within the TryBlock.
 void setCommand(Command c)
          set the command in this try-block
 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

command

protected Command command
the command in this try-block

Constructor Detail

TryBlock

public TryBlock()
Method Detail

setCommand

public void setCommand(Command c)
set the command in this try-block

Parameters:
c - the command in this try-block

execute

public int execute(Context context)
            throws java.lang.Exception
Executes the command within the TryBlock. Always returns 0.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
context - Context this command will be executed in.
Returns:
0 always
Throws:
java.lang.Exception - never

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"TRY-CATCH-BLOCK {" + command + "}";


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