1
2
3
4
5
6
7
8 package org.exolab.castor.builder.binding.xml;
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public class ClassType implements java.io.Serializable {
25
26
27
28
29
30
31
32
33
34 private java.lang.String _package;
35
36
37
38
39 private java.lang.String _name;
40
41
42
43
44 private boolean _final;
45
46
47
48
49 private boolean _has_final;
50
51
52
53
54 private boolean _abstract;
55
56
57
58
59 private boolean _has_abstract;
60
61
62
63
64 private boolean _equals;
65
66
67
68
69 private boolean _has_equals;
70
71
72
73
74 private boolean _bound;
75
76
77
78
79 private boolean _has_bound;
80
81
82
83
84 private java.util.List _implementsList;
85
86
87
88
89 private java.lang.String _extends;
90
91
92
93
94
95
96 public ClassType() {
97 super();
98 this._implementsList = new java.util.ArrayList();
99 }
100
101
102
103
104
105
106
107
108
109
110
111
112
113 public void addImplements(
114 final java.lang.String vImplements)
115 throws java.lang.IndexOutOfBoundsException {
116 this._implementsList.add(vImplements);
117 }
118
119
120
121
122
123
124
125
126
127 public void addImplements(
128 final int index,
129 final java.lang.String vImplements)
130 throws java.lang.IndexOutOfBoundsException {
131 this._implementsList.add(index, vImplements);
132 }
133
134
135
136 public void deleteAbstract(
137 ) {
138 this._has_abstract= false;
139 }
140
141
142
143 public void deleteBound(
144 ) {
145 this._has_bound= false;
146 }
147
148
149
150 public void deleteEquals(
151 ) {
152 this._has_equals= false;
153 }
154
155
156
157 public void deleteFinal(
158 ) {
159 this._has_final= false;
160 }
161
162
163
164
165
166
167
168 public java.util.Enumeration enumerateImplements(
169 ) {
170 return java.util.Collections.enumeration(this._implementsList);
171 }
172
173
174
175
176
177
178 public boolean getAbstract(
179 ) {
180 return this._abstract;
181 }
182
183
184
185
186
187
188 public boolean getBound(
189 ) {
190 return this._bound;
191 }
192
193
194
195
196
197
198 public boolean getEquals(
199 ) {
200 return this._equals;
201 }
202
203
204
205
206
207
208 public java.lang.String getExtends(
209 ) {
210 return this._extends;
211 }
212
213
214
215
216
217
218 public boolean getFinal(
219 ) {
220 return this._final;
221 }
222
223
224
225
226
227
228
229
230
231 public java.lang.String getImplements(
232 final int index)
233 throws java.lang.IndexOutOfBoundsException {
234
235 if (index < 0 || index >= this._implementsList.size()) {
236 throw new IndexOutOfBoundsException("getImplements: Index value '" + index + "' not in range [0.." + (this._implementsList.size() - 1) + "]");
237 }
238
239 return (java.lang.String) _implementsList.get(index);
240 }
241
242
243
244
245
246
247
248
249
250
251 public java.lang.String[] getImplements(
252 ) {
253 java.lang.String[] array = new java.lang.String[0];
254 return (java.lang.String[]) this._implementsList.toArray(array);
255 }
256
257
258
259
260
261
262 public int getImplementsCount(
263 ) {
264 return this._implementsList.size();
265 }
266
267
268
269
270
271
272 public java.lang.String getName(
273 ) {
274 return this._name;
275 }
276
277
278
279
280
281
282 public java.lang.String getPackage(
283 ) {
284 return this._package;
285 }
286
287
288
289
290
291
292 public boolean hasAbstract(
293 ) {
294 return this._has_abstract;
295 }
296
297
298
299
300
301
302 public boolean hasBound(
303 ) {
304 return this._has_bound;
305 }
306
307
308
309
310
311
312 public boolean hasEquals(
313 ) {
314 return this._has_equals;
315 }
316
317
318
319
320
321
322 public boolean hasFinal(
323 ) {
324 return this._has_final;
325 }
326
327
328
329
330
331
332 public boolean isAbstract(
333 ) {
334 return this._abstract;
335 }
336
337
338
339
340
341
342 public boolean isBound(
343 ) {
344 return this._bound;
345 }
346
347
348
349
350
351
352 public boolean isEquals(
353 ) {
354 return this._equals;
355 }
356
357
358
359
360
361
362 public boolean isFinal(
363 ) {
364 return this._final;
365 }
366
367
368
369
370
371
372 public boolean isValid(
373 ) {
374 try {
375 validate();
376 } catch (org.exolab.castor.xml.ValidationException vex) {
377 return false;
378 }
379 return true;
380 }
381
382
383
384
385
386
387
388 public java.util.Iterator iterateImplements(
389 ) {
390 return this._implementsList.iterator();
391 }
392
393
394
395
396
397
398
399
400
401
402 public void marshal(
403 final java.io.Writer out)
404 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
405 org.exolab.castor.xml.Marshaller.marshal(this, out);
406 }
407
408
409
410
411
412
413
414
415
416
417
418
419 public void marshal(
420 final org.xml.sax.ContentHandler handler)
421 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
422 org.exolab.castor.xml.Marshaller.marshal(this, handler);
423 }
424
425
426
427 public void removeAllImplements(
428 ) {
429 this._implementsList.clear();
430 }
431
432
433
434
435
436
437
438 public boolean removeImplements(
439 final java.lang.String vImplements) {
440 boolean removed = _implementsList.remove(vImplements);
441 return removed;
442 }
443
444
445
446
447
448
449
450 public java.lang.String removeImplementsAt(
451 final int index) {
452 java.lang.Object obj = this._implementsList.remove(index);
453 return (java.lang.String) obj;
454 }
455
456
457
458
459
460
461
462 public void setAbstract(
463 final boolean _abstract) {
464 this._abstract = _abstract;
465 this._has_abstract = true;
466 }
467
468
469
470
471
472
473 public void setBound(
474 final boolean bound) {
475 this._bound = bound;
476 this._has_bound = true;
477 }
478
479
480
481
482
483
484 public void setEquals(
485 final boolean equals) {
486 this._equals = equals;
487 this._has_equals = true;
488 }
489
490
491
492
493
494
495
496 public void setExtends(
497 final java.lang.String _extends) {
498 this._extends = _extends;
499 }
500
501
502
503
504
505
506
507 public void setFinal(
508 final boolean _final) {
509 this._final = _final;
510 this._has_final = true;
511 }
512
513
514
515
516
517
518
519
520
521 public void setImplements(
522 final int index,
523 final java.lang.String vImplements)
524 throws java.lang.IndexOutOfBoundsException {
525
526 if (index < 0 || index >= this._implementsList.size()) {
527 throw new IndexOutOfBoundsException("setImplements: Index value '" + index + "' not in range [0.." + (this._implementsList.size() - 1) + "]");
528 }
529
530 this._implementsList.set(index, vImplements);
531 }
532
533
534
535
536
537
538 public void setImplements(
539 final java.lang.String[] vImplementsArray) {
540
541 _implementsList.clear();
542
543 for (int i = 0; i < vImplementsArray.length; i++) {
544 this._implementsList.add(vImplementsArray[i]);
545 }
546 }
547
548
549
550
551
552
553 public void setName(
554 final java.lang.String name) {
555 this._name = name;
556 }
557
558
559
560
561
562
563
564 public void setPackage(
565 final java.lang.String _package) {
566 this._package = _package;
567 }
568
569
570
571
572
573
574
575
576
577
578
579
580 public static org.exolab.castor.builder.binding.xml.ClassType unmarshalClassType(
581 final java.io.Reader reader)
582 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
583 return (org.exolab.castor.builder.binding.xml.ClassType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ClassType.class, reader);
584 }
585
586
587
588
589
590
591
592 public void validate(
593 )
594 throws org.exolab.castor.xml.ValidationException {
595 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
596 validator.validate(this);
597 }
598
599 }