1 package net.sf.tomp.xtcl.command;
2
3 import net.sf.tomp.xtcl.Context;
4
5 /***
6 * Dumps the Context content
7 *
8 * @author tomp
9 */
10 public class DumpContext extends AbstractCommand {
11 /*** deep? */
12 protected boolean deep = false;
13
14 /***
15 * set deep
16 *
17 * @param v deep?
18 */
19 public void setDeep(boolean v) {
20 deep = v;
21 }
22
23 /***
24 * Dumps the Context content.
25 *
26 * @param context what Context to dump
27 * @return 0 (OK)
28 * @throws Exception
29 */
30 public int execute(Context context) throws Exception {
31
32 context.dump(deep);
33
34 return done(context, 0);
35 }
36
37 /***
38 * String representation
39 *
40 * @return "DUMP CONTEXT " + (deep ? "WITH VARIABLE CONTENT" : "");
41 */
42 public String toString() {
43 return "DUMP CONTEXT " + (deep ? "WITH VARIABLE CONTENT" : "");
44 }
45 }
46
47
48
49
50
51
52
53
54
55
56