net.sf.tomp.xtcl.command
Class Dump

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

public class Dump
extends AbstractCommand

Prints variable content.

Author:
tomp

Field Summary
protected  boolean all
          DOCUMENT ME!
protected  boolean deep
          DOCUMENT ME!
protected  java.lang.String var
          DOCUMENT ME!
 
Constructor Summary
Dump()
           
 
Method Summary
 int execute(Context context)
          Prints variable content.
 void setAll(boolean v)
          DOCUMENT ME!
 void setDeep(boolean v)
          set whether deep or not
 void setVar(java.lang.String v)
          set the variable name
 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

var

protected java.lang.String var
DOCUMENT ME!


deep

protected boolean deep
DOCUMENT ME!


all

protected boolean all
DOCUMENT ME!

Constructor Detail

Dump

public Dump()
Method Detail

setVar

public void setVar(java.lang.String v)
set the variable name

Parameters:
v - the variable name

setDeep

public void setDeep(boolean v)
set whether deep or not

Parameters:
v - deeply?

setAll

public void setAll(boolean v)
DOCUMENT ME!

Parameters:
v - DOCUMENT ME!

execute

public int execute(Context context)
            throws java.lang.Exception
Prints variable content. String is printed directly as 'string', Properties and Templates via toString() otherwise the variable is getAsSource() and transformed via empty transformation to output.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
context - to get dumped variable from
Returns:
0 if OK, otherwise 1
Throws:
java.lang.Exception - if output fails

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"DUMP " + ((var == null) ? ("CONTEXT " + (deep ? "DEEP" : "")) : var);


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