1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.io.IOException;
/* */ import java.io.PrintStream;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class StdoutAction
/* */ extends Action
/* */ {
/* 25 */ String txt = null;
/* 26 */ boolean dumpArg = false;
/* */
/* */
/* */
/* */
/* */ public StdoutAction() {}
/* */
/* */
/* */
/* */ public StdoutAction(String text)
/* */ {
/* 37 */ this.txt = text;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Persister trigger(Event arg, Persister seqID)
/* */ {
/* 47 */ if (this.txt != null) {
/* 48 */ System.out.println(this.txt);
/* */ } else
/* 50 */ System.out.println("StdoutAction " + getName() + ", no text!");
/* 51 */ if (this.dumpArg)
/* 52 */ if (arg == null) {
/* 53 */ System.out.println("<Null event>");
/* */ } else
/* 55 */ System.out.println("<" + arg + ">");
/* 56 */ System.out.flush();
/* */
/* 58 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Object properties(int index, int offset, int mode, Object value)
/* */ throws NoSuchPropertyException
/* */ {
/* 69 */ Object ret = null;
/* 70 */ switch (index - offset) {
/* */ case 0:
/* 72 */ if (mode == 0) {
/* 73 */ ret = StringPropertyEditor.make(new Property(this, index,
/* 74 */ "Text Out"));
/* 75 */ } else if (mode == 1) {
/* 76 */ ret = this.txt;
/* 77 */ } else if (mode == 2)
/* 78 */ this.txt = ((String)value);
/* 79 */ break;
/* */ case 1:
/* 81 */ if (mode == 0) {
/* 82 */ ret = BooleanPropertyEditor.make(
/* 83 */ new Property(this, index, "Dump Event"),
/* 84 */ "Don't print event", "Print event");
/* 85 */ } else if (mode == 1) {
/* 86 */ ret = new Boolean(this.dumpArg);
/* 87 */ } else if (mode == 2)
/* 88 */ this.dumpArg = ((Boolean)value).booleanValue();
/* 89 */ break;
/* */ default:
/* 91 */ ret = super.properties(index, offset + 2, mode, value);
/* */ }
/* 93 */ return ret;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* 100 */ private static Object classCookie = new Object();
/* */
/* */ public void saveState(Saver s) throws IOException
/* */ {
/* 104 */ s.saveVersion(1, classCookie);
/* 105 */ super.saveState(s);
/* 106 */ s.saveString(this.txt);
/* 107 */ s.saveBoolean(this.dumpArg);
/* */ }
/* */
/* */ public void restoreState(Restorer r)
/* */ throws IOException, TooNewException
/* */ {
/* 113 */ switch (r.restoreVersion(classCookie)) {
/* */ case 0:
/* 115 */ super.restoreState(r);
/* 116 */ this.txt = r.restoreString();
/* 117 */ r.setOldFlag();
/* 118 */ break;
/* */ case 1:
/* 120 */ super.restoreState(r);
/* 121 */ this.txt = r.restoreString();
/* 122 */ this.dumpArg = r.restoreBoolean();
/* 123 */ break;
/* */ default:
/* 125 */ throw new TooNewException();
/* */ }
/* */
/* */ }
/* */
/* */
/* */
/* */
/* */ public String toString()
/* */ {
/* 135 */ return super.toString() + "[" + this.txt + "]";
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StdoutAction.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|