1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor;
9
10
11
12
13
14
15
16
17
18
19
20 public class ConfigurationType implements java.io.Serializable {
21
22
23
24
25
26
27
28
29
30
31 private java.util.List _callMethodList;
32
33
34
35
36
37
38 public ConfigurationType() {
39 super();
40 this._callMethodList = new java.util.ArrayList();
41 }
42
43
44
45
46
47
48
49
50
51
52
53
54
55 public void addCallMethod(
56 final org.exolab.castor.tests.framework.testDescriptor.CallMethod vCallMethod)
57 throws java.lang.IndexOutOfBoundsException {
58 this._callMethodList.add(vCallMethod);
59 }
60
61
62
63
64
65
66
67
68
69 public void addCallMethod(
70 final int index,
71 final org.exolab.castor.tests.framework.testDescriptor.CallMethod vCallMethod)
72 throws java.lang.IndexOutOfBoundsException {
73 this._callMethodList.add(index, vCallMethod);
74 }
75
76
77
78
79
80
81
82 public java.util.Enumeration enumerateCallMethod(
83 ) {
84 return java.util.Collections.enumeration(this._callMethodList);
85 }
86
87
88
89
90
91
92
93
94
95
96
97 public org.exolab.castor.tests.framework.testDescriptor.CallMethod getCallMethod(
98 final int index)
99 throws java.lang.IndexOutOfBoundsException {
100
101 if (index < 0 || index >= this._callMethodList.size()) {
102 throw new IndexOutOfBoundsException("getCallMethod: Index value '" + index + "' not in range [0.." + (this._callMethodList.size() - 1) + "]");
103 }
104
105 return (org.exolab.castor.tests.framework.testDescriptor.CallMethod) _callMethodList.get(index);
106 }
107
108
109
110
111
112
113
114
115
116
117 public org.exolab.castor.tests.framework.testDescriptor.CallMethod[] getCallMethod(
118 ) {
119 org.exolab.castor.tests.framework.testDescriptor.CallMethod[] array = new org.exolab.castor.tests.framework.testDescriptor.CallMethod[0];
120 return (org.exolab.castor.tests.framework.testDescriptor.CallMethod[]) this._callMethodList.toArray(array);
121 }
122
123
124
125
126
127
128 public int getCallMethodCount(
129 ) {
130 return this._callMethodList.size();
131 }
132
133
134
135
136
137
138 public boolean isValid(
139 ) {
140 try {
141 validate();
142 } catch (org.exolab.castor.xml.ValidationException vex) {
143 return false;
144 }
145 return true;
146 }
147
148
149
150
151
152
153
154 public java.util.Iterator iterateCallMethod(
155 ) {
156 return this._callMethodList.iterator();
157 }
158
159
160
161
162
163
164
165
166
167
168 public void marshal(
169 final java.io.Writer out)
170 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
171 org.exolab.castor.xml.Marshaller.marshal(this, out);
172 }
173
174
175
176
177
178
179
180
181
182
183
184
185 public void marshal(
186 final org.xml.sax.ContentHandler handler)
187 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
188 org.exolab.castor.xml.Marshaller.marshal(this, handler);
189 }
190
191
192
193 public void removeAllCallMethod(
194 ) {
195 this._callMethodList.clear();
196 }
197
198
199
200
201
202
203
204 public boolean removeCallMethod(
205 final org.exolab.castor.tests.framework.testDescriptor.CallMethod vCallMethod) {
206 boolean removed = _callMethodList.remove(vCallMethod);
207 return removed;
208 }
209
210
211
212
213
214
215
216 public org.exolab.castor.tests.framework.testDescriptor.CallMethod removeCallMethodAt(
217 final int index) {
218 java.lang.Object obj = this._callMethodList.remove(index);
219 return (org.exolab.castor.tests.framework.testDescriptor.CallMethod) obj;
220 }
221
222
223
224
225
226
227
228
229
230 public void setCallMethod(
231 final int index,
232 final org.exolab.castor.tests.framework.testDescriptor.CallMethod vCallMethod)
233 throws java.lang.IndexOutOfBoundsException {
234
235 if (index < 0 || index >= this._callMethodList.size()) {
236 throw new IndexOutOfBoundsException("setCallMethod: Index value '" + index + "' not in range [0.." + (this._callMethodList.size() - 1) + "]");
237 }
238
239 this._callMethodList.set(index, vCallMethod);
240 }
241
242
243
244
245
246
247 public void setCallMethod(
248 final org.exolab.castor.tests.framework.testDescriptor.CallMethod[] vCallMethodArray) {
249
250 _callMethodList.clear();
251
252 for (int i = 0; i < vCallMethodArray.length; i++) {
253 this._callMethodList.add(vCallMethodArray[i]);
254 }
255 }
256
257
258
259
260
261
262
263
264
265
266
267
268 public static org.exolab.castor.tests.framework.testDescriptor.ConfigurationType unmarshal(
269 final java.io.Reader reader)
270 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
271 return (org.exolab.castor.tests.framework.testDescriptor.ConfigurationType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.ConfigurationType.class, reader);
272 }
273
274
275
276
277
278
279
280 public void validate(
281 )
282 throws org.exolab.castor.xml.ValidationException {
283 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
284 validator.validate(this);
285 }
286
287 }