1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor.types;
9
10
11
12
13
14
15 public class FailureStepType implements java.io.Serializable {
16
17
18
19
20
21
22
23
24
25 public static final int PARSE_SCHEMA_TYPE = 0;
26
27
28
29
30 public static final FailureStepType PARSE_SCHEMA = new FailureStepType(PARSE_SCHEMA_TYPE, "parse-schema");
31
32
33
34
35 public static final int WRITE_SCHEMA_TYPE = 1;
36
37
38
39
40 public static final FailureStepType WRITE_SCHEMA = new FailureStepType(WRITE_SCHEMA_TYPE, "write-schema");
41
42
43
44
45 public static final int SOURCE_GENERATION_TYPE = 2;
46
47
48
49
50 public static final FailureStepType SOURCE_GENERATION = new FailureStepType(SOURCE_GENERATION_TYPE, "source-generation");
51
52
53
54
55 public static final int SOURCE_COMPILATION_TYPE = 3;
56
57
58
59
60 public static final FailureStepType SOURCE_COMPILATION = new FailureStepType(SOURCE_COMPILATION_TYPE, "source-compilation");
61
62
63
64
65 public static final int LOAD_GENERATED_CLASSES_TYPE = 4;
66
67
68
69
70 public static final FailureStepType LOAD_GENERATED_CLASSES = new FailureStepType(LOAD_GENERATED_CLASSES_TYPE, "load-generated-classes");
71
72
73
74
75 public static final int UNMARSHAL_REFERENCE_TYPE = 5;
76
77
78
79
80 public static final FailureStepType UNMARSHAL_REFERENCE = new FailureStepType(UNMARSHAL_REFERENCE_TYPE, "unmarshal-reference");
81
82
83
84
85 public static final int MARSHAL_TO_DISK_TYPE = 6;
86
87
88
89
90 public static final FailureStepType MARSHAL_TO_DISK = new FailureStepType(MARSHAL_TO_DISK_TYPE, "marshal-to-disk");
91
92
93
94
95 public static final int COMPARE_TO_REFERENCE_TYPE = 7;
96
97
98
99
100 public static final FailureStepType COMPARE_TO_REFERENCE = new FailureStepType(COMPARE_TO_REFERENCE_TYPE, "compare-to-reference");
101
102
103
104
105 public static final int SECOND_COMPARE_TYPE = 8;
106
107
108
109
110 public static final FailureStepType SECOND_COMPARE = new FailureStepType(SECOND_COMPARE_TYPE, "second-compare");
111
112
113
114
115 public static final int LISTENER_COMPARISON_TYPE = 9;
116
117
118
119
120 public static final FailureStepType LISTENER_COMPARISON = new FailureStepType(LISTENER_COMPARISON_TYPE, "listener-comparison");
121
122
123
124
125 public static final int SECOND_UNMARSHAL_TYPE = 10;
126
127
128
129
130 public static final FailureStepType SECOND_UNMARSHAL = new FailureStepType(SECOND_UNMARSHAL_TYPE, "second-unmarshal");
131
132
133
134
135 public static final int CUSTOM_TEST_TYPE = 11;
136
137
138
139
140 public static final FailureStepType CUSTOM_TEST = new FailureStepType(CUSTOM_TEST_TYPE, "custom-test");
141
142
143
144
145 private static java.util.Hashtable _memberTable = init();
146
147
148
149
150 private final int type;
151
152
153
154
155 private java.lang.String stringValue = null;
156
157
158
159
160
161
162 private FailureStepType(final int type, final java.lang.String value) {
163 super();
164 this.type = type;
165 this.stringValue = value;
166 }
167
168
169
170
171
172
173
174
175
176
177
178
179
180 public static java.util.Enumeration enumerate(
181 ) {
182 return _memberTable.elements();
183 }
184
185
186
187
188
189
190 public int getType(
191 ) {
192 return this.type;
193 }
194
195
196
197
198
199
200 private static java.util.Hashtable init(
201 ) {
202 java.util.Hashtable members = new java.util.Hashtable();
203 members.put("parse-schema", PARSE_SCHEMA);
204 members.put("write-schema", WRITE_SCHEMA);
205 members.put("source-generation", SOURCE_GENERATION);
206 members.put("source-compilation", SOURCE_COMPILATION);
207 members.put("load-generated-classes", LOAD_GENERATED_CLASSES);
208 members.put("unmarshal-reference", UNMARSHAL_REFERENCE);
209 members.put("marshal-to-disk", MARSHAL_TO_DISK);
210 members.put("compare-to-reference", COMPARE_TO_REFERENCE);
211 members.put("second-compare", SECOND_COMPARE);
212 members.put("listener-comparison", LISTENER_COMPARISON);
213 members.put("second-unmarshal", SECOND_UNMARSHAL);
214 members.put("custom-test", CUSTOM_TEST);
215 return members;
216 }
217
218
219
220
221
222
223
224
225 private java.lang.Object readResolve(
226 ) {
227 return valueOf(this.stringValue);
228 }
229
230
231
232
233
234
235
236 public java.lang.String toString(
237 ) {
238 return this.stringValue;
239 }
240
241
242
243
244
245
246
247
248 public static org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType valueOf(
249 final java.lang.String string) {
250 java.lang.Object obj = null;
251 if (string != null) {
252 obj = _memberTable.get(string);
253 }
254 if (obj == null) {
255 String err = "" + string + " is not a valid FailureStepType";
256 throw new IllegalArgumentException(err);
257 }
258 return (FailureStepType) obj;
259 }
260
261 }