View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.tests.framework.testDescriptor.types;
9   
10  /**
11   * Class FailureStepType.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class FailureStepType implements java.io.Serializable {
16  
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * The parse-schema type
24       */
25      public static final int PARSE_SCHEMA_TYPE = 0;
26  
27      /**
28       * The instance of the parse-schema type
29       */
30      public static final FailureStepType PARSE_SCHEMA = new FailureStepType(PARSE_SCHEMA_TYPE, "parse-schema");
31  
32      /**
33       * The write-schema type
34       */
35      public static final int WRITE_SCHEMA_TYPE = 1;
36  
37      /**
38       * The instance of the write-schema type
39       */
40      public static final FailureStepType WRITE_SCHEMA = new FailureStepType(WRITE_SCHEMA_TYPE, "write-schema");
41  
42      /**
43       * The source-generation type
44       */
45      public static final int SOURCE_GENERATION_TYPE = 2;
46  
47      /**
48       * The instance of the source-generation type
49       */
50      public static final FailureStepType SOURCE_GENERATION = new FailureStepType(SOURCE_GENERATION_TYPE, "source-generation");
51  
52      /**
53       * The source-compilation type
54       */
55      public static final int SOURCE_COMPILATION_TYPE = 3;
56  
57      /**
58       * The instance of the source-compilation type
59       */
60      public static final FailureStepType SOURCE_COMPILATION = new FailureStepType(SOURCE_COMPILATION_TYPE, "source-compilation");
61  
62      /**
63       * The load-generated-classes type
64       */
65      public static final int LOAD_GENERATED_CLASSES_TYPE = 4;
66  
67      /**
68       * The instance of the load-generated-classes type
69       */
70      public static final FailureStepType LOAD_GENERATED_CLASSES = new FailureStepType(LOAD_GENERATED_CLASSES_TYPE, "load-generated-classes");
71  
72      /**
73       * The unmarshal-reference type
74       */
75      public static final int UNMARSHAL_REFERENCE_TYPE = 5;
76  
77      /**
78       * The instance of the unmarshal-reference type
79       */
80      public static final FailureStepType UNMARSHAL_REFERENCE = new FailureStepType(UNMARSHAL_REFERENCE_TYPE, "unmarshal-reference");
81  
82      /**
83       * The marshal-to-disk type
84       */
85      public static final int MARSHAL_TO_DISK_TYPE = 6;
86  
87      /**
88       * The instance of the marshal-to-disk type
89       */
90      public static final FailureStepType MARSHAL_TO_DISK = new FailureStepType(MARSHAL_TO_DISK_TYPE, "marshal-to-disk");
91  
92      /**
93       * The compare-to-reference type
94       */
95      public static final int COMPARE_TO_REFERENCE_TYPE = 7;
96  
97      /**
98       * The instance of the compare-to-reference type
99       */
100     public static final FailureStepType COMPARE_TO_REFERENCE = new FailureStepType(COMPARE_TO_REFERENCE_TYPE, "compare-to-reference");
101 
102     /**
103      * The second-compare type
104      */
105     public static final int SECOND_COMPARE_TYPE = 8;
106 
107     /**
108      * The instance of the second-compare type
109      */
110     public static final FailureStepType SECOND_COMPARE = new FailureStepType(SECOND_COMPARE_TYPE, "second-compare");
111 
112     /**
113      * The listener-comparison type
114      */
115     public static final int LISTENER_COMPARISON_TYPE = 9;
116 
117     /**
118      * The instance of the listener-comparison type
119      */
120     public static final FailureStepType LISTENER_COMPARISON = new FailureStepType(LISTENER_COMPARISON_TYPE, "listener-comparison");
121 
122     /**
123      * The second-unmarshal type
124      */
125     public static final int SECOND_UNMARSHAL_TYPE = 10;
126 
127     /**
128      * The instance of the second-unmarshal type
129      */
130     public static final FailureStepType SECOND_UNMARSHAL = new FailureStepType(SECOND_UNMARSHAL_TYPE, "second-unmarshal");
131 
132     /**
133      * The custom-test type
134      */
135     public static final int CUSTOM_TEST_TYPE = 11;
136 
137     /**
138      * The instance of the custom-test type
139      */
140     public static final FailureStepType CUSTOM_TEST = new FailureStepType(CUSTOM_TEST_TYPE, "custom-test");
141 
142     /**
143      * Field _memberTable.
144      */
145     private static java.util.Hashtable _memberTable = init();
146 
147     /**
148      * Field type.
149      */
150     private final int type;
151 
152     /**
153      * Field stringValue.
154      */
155     private java.lang.String stringValue = null;
156 
157 
158       //----------------/
159      //- Constructors -/
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      //- Methods -/
171     //-----------/
172 
173     /**
174      * Method enumerate.Returns an enumeration of all possible
175      * instances of FailureStepType
176      * 
177      * @return an Enumeration over all possible instances of
178      * FailureStepType
179      */
180     public static java.util.Enumeration enumerate(
181     ) {
182         return _memberTable.elements();
183     }
184 
185     /**
186      * Method getType.Returns the type of this FailureStepType
187      * 
188      * @return the type of this FailureStepType
189      */
190     public int getType(
191     ) {
192         return this.type;
193     }
194 
195     /**
196      * Method init.
197      * 
198      * @return the initialized Hashtable for the member table
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      * Method readResolve. will be called during deserialization to
220      * replace the deserialized object with the correct constant
221      * instance.
222      * 
223      * @return this deserialized object
224      */
225     private java.lang.Object readResolve(
226     ) {
227         return valueOf(this.stringValue);
228     }
229 
230     /**
231      * Method toString.Returns the String representation of this
232      * FailureStepType
233      * 
234      * @return the String representation of this FailureStepType
235      */
236     public java.lang.String toString(
237     ) {
238         return this.stringValue;
239     }
240 
241     /**
242      * Method valueOf.Returns a new FailureStepType based on the
243      * given String value.
244      * 
245      * @param string
246      * @return the FailureStepType value of parameter 'string'
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 }