KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > parser > ast > Exec


1 // Autogenerated AST node
2
package org.python.parser.ast;
3 import org.python.parser.SimpleNode;
4 import java.io.DataOutputStream JavaDoc;
5 import java.io.IOException JavaDoc;
6
7 public class Exec extends stmtType {
8     public exprType body;
9     public exprType globals;
10     public exprType locals;
11
12     public Exec(exprType body, exprType globals, exprType locals) {
13         this.body = body;
14         this.globals = globals;
15         this.locals = locals;
16     }
17
18     public Exec(exprType body, exprType globals, exprType locals,
19     SimpleNode parent) {
20         this(body, globals, locals);
21         this.beginLine = parent.beginLine;
22         this.beginColumn = parent.beginColumn;
23     }
24
25     public String JavaDoc toString() {
26         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("Exec[");
27         sb.append("body=");
28         sb.append(dumpThis(this.body));
29         sb.append(", ");
30         sb.append("globals=");
31         sb.append(dumpThis(this.globals));
32         sb.append(", ");
33         sb.append("locals=");
34         sb.append(dumpThis(this.locals));
35         sb.append("]");
36         return sb.toString();
37     }
38
39     public void pickle(DataOutputStream JavaDoc ostream) throws IOException JavaDoc {
40         pickleThis(22, ostream);
41         pickleThis(this.body, ostream);
42         pickleThis(this.globals, ostream);
43         pickleThis(this.locals, ostream);
44     }
45
46     public Object JavaDoc accept(VisitorIF visitor) throws Exception JavaDoc {
47         return visitor.visitExec(this);
48     }
49
50     public void traverse(VisitorIF visitor) throws Exception JavaDoc {
51         if (body != null)
52             body.accept(visitor);
53         if (globals != null)
54             globals.accept(visitor);
55         if (locals != null)
56             locals.accept(visitor);
57     }
58
59 }
60
Popular Tags