1
2
3
4
5
6
7
8
9 package org.jomc.model;
10
11 import java.io.ByteArrayInputStream;
12 import java.io.ByteArrayOutputStream;
13 import java.io.File;
14 import java.io.IOException;
15 import java.io.InvalidClassException;
16 import java.io.NotSerializableException;
17 import java.io.ObjectInputStream;
18 import java.io.ObjectOutputStream;
19 import java.io.OptionalDataException;
20 import java.io.Serializable;
21 import java.io.StreamCorruptedException;
22 import java.lang.reflect.Array;
23 import java.lang.reflect.InvocationTargetException;
24 import java.math.BigDecimal;
25 import java.math.BigInteger;
26 import java.net.MalformedURLException;
27 import java.net.URI;
28 import java.net.URISyntaxException;
29 import java.net.URL;
30 import java.util.ArrayList;
31 import java.util.Calendar;
32 import java.util.Currency;
33 import java.util.Date;
34 import java.util.Iterator;
35 import java.util.List;
36 import java.util.Locale;
37 import java.util.TimeZone;
38 import java.util.UUID;
39 import javax.activation.MimeType;
40 import javax.activation.MimeTypeParseException;
41 import javax.annotation.Generated;
42 import javax.xml.bind.JAXBElement;
43 import javax.xml.bind.annotation.XmlAccessType;
44 import javax.xml.bind.annotation.XmlAccessorType;
45 import javax.xml.bind.annotation.XmlAnyElement;
46 import javax.xml.bind.annotation.XmlAttribute;
47 import javax.xml.bind.annotation.XmlElement;
48 import javax.xml.bind.annotation.XmlType;
49 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
50 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
51 import javax.xml.datatype.Duration;
52 import javax.xml.datatype.XMLGregorianCalendar;
53 import javax.xml.namespace.QName;
54 import org.w3c.dom.Element;
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 @XmlAccessorType(XmlAccessType.FIELD)
107 @XmlType(name = "Implementation", namespace = "http://jomc.org/model", propOrder = {
108 "specifications",
109 "implementations",
110 "dependencies",
111 "properties",
112 "messages",
113 "any"
114 })
115 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
116 public class Implementation
117 extends ModelObject
118 implements Cloneable
119 {
120
121 @XmlElement(namespace = "http://jomc.org/model")
122 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
123 protected Specifications specifications;
124 @XmlElement(namespace = "http://jomc.org/model")
125 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
126 protected Implementations implementations;
127 @XmlElement(namespace = "http://jomc.org/model")
128 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
129 protected Dependencies dependencies;
130 @XmlElement(namespace = "http://jomc.org/model")
131 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
132 protected Properties properties;
133 @XmlElement(namespace = "http://jomc.org/model")
134 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
135 protected Messages messages;
136 @XmlAnyElement(lax = true)
137 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
138 protected List<Object> any;
139 @XmlAttribute(name = "identifier", required = true)
140 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
141 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
142 protected String identifier;
143 @XmlAttribute(name = "name", required = true)
144 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
145 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
146 protected String name;
147 @XmlAttribute(name = "class")
148 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
149 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
150 protected String clazz;
151 @XmlAttribute(name = "location")
152 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
153 protected String location;
154 @XmlAttribute(name = "vendor")
155 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
156 protected String vendor;
157 @XmlAttribute(name = "version")
158 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
159 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
160 protected String version;
161 @XmlAttribute(name = "final")
162 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
163 protected Boolean _final;
164 @XmlAttribute(name = "stateless")
165 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
166 protected Boolean stateless;
167 @XmlAttribute(name = "abstract")
168 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
169 protected Boolean _abstract;
170 @XmlAttribute(name = "classDeclaration")
171 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
172 protected Boolean classDeclaration;
173
174
175
176
177
178 public Implementation() {
179
180 super();
181 }
182
183
184
185
186
187
188
189
190
191
192 public Implementation(final Implementation o) {
193
194 super(o);
195 if (o == null) {
196 throw new NullPointerException("Cannot create a copy of 'Implementation' from 'null'.");
197 }
198
199 this.specifications = ((o.specifications == null)?null:((o.getSpecifications() == null)?null:o.getSpecifications().clone()));
200
201 this.implementations = ((o.implementations == null)?null:((o.getImplementations() == null)?null:o.getImplementations().clone()));
202
203 this.dependencies = ((o.dependencies == null)?null:((o.getDependencies() == null)?null:o.getDependencies().clone()));
204
205 this.properties = ((o.properties == null)?null:((o.getProperties() == null)?null:o.getProperties().clone()));
206
207 this.messages = ((o.messages == null)?null:((o.getMessages() == null)?null:o.getMessages().clone()));
208
209 if (o.any!= null) {
210 copyAny(o.getAny(), this.getAny());
211 }
212
213 this.identifier = ((o.identifier == null)?null:o.getIdentifier());
214
215 this.name = ((o.name == null)?null:o.getName());
216
217 this.clazz = ((o.clazz == null)?null:o.getClazz());
218
219 this.location = ((o.location == null)?null:o.getLocation());
220
221 this.vendor = ((o.vendor == null)?null:o.getVendor());
222
223 this.version = ((o.version == null)?null:o.getVersion());
224
225 this._final = ((o._final == null)?null:o.isFinal());
226
227 this.stateless = ((o.stateless == null)?null:o.isStateless());
228
229 this._abstract = ((o._abstract == null)?null:o.isAbstract());
230
231 this.classDeclaration = ((o.classDeclaration == null)?null:o.isClassDeclaration());
232 }
233
234
235
236
237
238
239
240
241
242 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
243 public Specifications getSpecifications() {
244 return specifications;
245 }
246
247
248
249
250
251
252
253
254
255 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
256 public void setSpecifications(Specifications value) {
257 this.specifications = value;
258 }
259
260
261
262
263
264
265
266
267
268 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
269 public Implementations getImplementations() {
270 return implementations;
271 }
272
273
274
275
276
277
278
279
280
281 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
282 public void setImplementations(Implementations value) {
283 this.implementations = value;
284 }
285
286
287
288
289
290
291
292
293
294 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
295 public Dependencies getDependencies() {
296 return dependencies;
297 }
298
299
300
301
302
303
304
305
306
307 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
308 public void setDependencies(Dependencies value) {
309 this.dependencies = value;
310 }
311
312
313
314
315
316
317
318
319
320 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
321 public Properties getProperties() {
322 return properties;
323 }
324
325
326
327
328
329
330
331
332
333 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
334 public void setProperties(Properties value) {
335 this.properties = value;
336 }
337
338
339
340
341
342
343
344
345
346 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
347 public Messages getMessages() {
348 return messages;
349 }
350
351
352
353
354
355
356
357
358
359 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
360 public void setMessages(Messages value) {
361 this.messages = value;
362 }
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
388 public List<Object> getAny() {
389 if (any == null) {
390 any = new ArrayList<Object>();
391 }
392 return this.any;
393 }
394
395
396
397
398
399
400
401
402
403 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
404 public String getIdentifier() {
405 return identifier;
406 }
407
408
409
410
411
412
413
414
415
416 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
417 public void setIdentifier(String value) {
418 this.identifier = value;
419 }
420
421
422
423
424
425
426
427
428
429 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
430 public String getName() {
431 return name;
432 }
433
434
435
436
437
438
439
440
441
442 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
443 public void setName(String value) {
444 this.name = value;
445 }
446
447
448
449
450
451
452
453
454
455 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
456 public String getClazz() {
457 return clazz;
458 }
459
460
461
462
463
464
465
466
467
468 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
469 public void setClazz(String value) {
470 this.clazz = value;
471 }
472
473
474
475
476
477
478
479
480
481 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
482 public String getLocation() {
483 return location;
484 }
485
486
487
488
489
490
491
492
493
494 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
495 public void setLocation(String value) {
496 this.location = value;
497 }
498
499
500
501
502
503
504
505
506
507 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
508 public String getVendor() {
509 return vendor;
510 }
511
512
513
514
515
516
517
518
519
520 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
521 public void setVendor(String value) {
522 this.vendor = value;
523 }
524
525
526
527
528
529
530
531
532
533 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
534 public String getVersion() {
535 return version;
536 }
537
538
539
540
541
542
543
544
545
546 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
547 public void setVersion(String value) {
548 this.version = value;
549 }
550
551
552
553
554
555
556
557
558
559 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
560 public boolean isFinal() {
561 if (_final == null) {
562 return false;
563 } else {
564 return _final;
565 }
566 }
567
568
569
570
571
572
573
574
575
576 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
577 public void setFinal(Boolean value) {
578 this._final = value;
579 }
580
581
582
583
584
585
586
587
588
589 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
590 public boolean isStateless() {
591 if (stateless == null) {
592 return false;
593 } else {
594 return stateless;
595 }
596 }
597
598
599
600
601
602
603
604
605
606 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
607 public void setStateless(Boolean value) {
608 this.stateless = value;
609 }
610
611
612
613
614
615
616
617
618
619 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
620 public boolean isAbstract() {
621 if (_abstract == null) {
622 return false;
623 } else {
624 return _abstract;
625 }
626 }
627
628
629
630
631
632
633
634
635
636 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
637 public void setAbstract(Boolean value) {
638 this._abstract = value;
639 }
640
641
642
643
644
645
646
647
648
649 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
650 public boolean isClassDeclaration() {
651 if (classDeclaration == null) {
652 return false;
653 } else {
654 return classDeclaration;
655 }
656 }
657
658
659
660
661
662
663
664
665
666 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
667 public void setClassDeclaration(Boolean value) {
668 this.classDeclaration = value;
669 }
670
671
672
673
674
675
676
677
678
679
680
681 @SuppressWarnings("unchecked")
682 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
683 private static void copyAny(final List<Object> source, final List<Object> target) {
684
685 if ((source!= null)&&(!source.isEmpty())) {
686 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
687 final Object next = it.next();
688 if (next instanceof Element) {
689
690 target.add(((Element)((Element) next).cloneNode(true)));
691 continue;
692 }
693 if (next instanceof Object) {
694
695 target.add(copyOf(((Object) next)));
696 continue;
697 }
698
699 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Implementation'."));
700 }
701 }
702 }
703
704
705
706
707
708
709
710
711
712 @SuppressWarnings("unchecked")
713 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
714 private static Object copyOf(final Object o) {
715
716 try {
717 if (o!= null) {
718 if (o.getClass().isPrimitive()) {
719 return o;
720 }
721 if (o.getClass().isArray()) {
722 return copyOfArray(o);
723 }
724
725 if (o instanceof Boolean) {
726 return o;
727 }
728 if (o instanceof Byte) {
729 return o;
730 }
731 if (o instanceof Character) {
732 return o;
733 }
734 if (o instanceof Double) {
735 return o;
736 }
737 if (o instanceof Enum) {
738 return o;
739 }
740 if (o instanceof Float) {
741 return o;
742 }
743 if (o instanceof Integer) {
744 return o;
745 }
746 if (o instanceof Long) {
747 return o;
748 }
749 if (o instanceof Short) {
750 return o;
751 }
752 if (o instanceof String) {
753 return o;
754 }
755 if (o instanceof BigDecimal) {
756 return o;
757 }
758 if (o instanceof BigInteger) {
759 return o;
760 }
761 if (o instanceof UUID) {
762 return o;
763 }
764 if (o instanceof QName) {
765 return o;
766 }
767 if (o instanceof Duration) {
768 return o;
769 }
770 if (o instanceof Currency) {
771 return o;
772 }
773
774 if (o instanceof File) {
775 return new File(o.toString());
776 }
777 if (o instanceof URI) {
778 return new URI(o.toString());
779 }
780 if (o instanceof URL) {
781 return new URL(o.toString());
782 }
783 if (o instanceof MimeType) {
784 return new MimeType(o.toString());
785 }
786
787 if (o instanceof XMLGregorianCalendar) {
788 return ((XMLGregorianCalendar) o).clone();
789 }
790 if (o instanceof Date) {
791 return ((Date) o).clone();
792 }
793 if (o instanceof Calendar) {
794 return ((Calendar) o).clone();
795 }
796 if (o instanceof TimeZone) {
797 return ((TimeZone) o).clone();
798 }
799 if (o instanceof Locale) {
800 return ((Locale) o).clone();
801 }
802 if (o instanceof Element) {
803 return ((Element)((Element) o).cloneNode(true));
804 }
805 if (o instanceof JAXBElement) {
806 return copyOf(((JAXBElement) o));
807 }
808 try {
809 return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
810 } catch (NoSuchMethodException e) {
811 if (o instanceof Serializable) {
812 return copyOf(((Serializable) o));
813 }
814
815 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
816 } catch (IllegalAccessException e) {
817
818 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
819 } catch (InvocationTargetException e) {
820
821 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
822 } catch (SecurityException e) {
823
824 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
825 } catch (IllegalArgumentException e) {
826
827 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
828 } catch (ExceptionInInitializerError e) {
829
830 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
831 }
832 }
833 return null;
834 } catch (MimeTypeParseException e) {
835 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
836 } catch (URISyntaxException e) {
837 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
838 } catch (MalformedURLException e) {
839 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
840 }
841 }
842
843
844
845
846
847
848
849
850
851 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
852 private static Object copyOfArray(final Object array) {
853
854 if (array!= null) {
855 if (array.getClass() == boolean[].class) {
856 return copyOf(((boolean[]) array));
857 }
858 if (array.getClass() == byte[].class) {
859 return copyOf(((byte[]) array));
860 }
861 if (array.getClass() == char[].class) {
862 return copyOf(((char[]) array));
863 }
864 if (array.getClass() == double[].class) {
865 return copyOf(((double[]) array));
866 }
867 if (array.getClass() == float[].class) {
868 return copyOf(((float[]) array));
869 }
870 if (array.getClass() == int[].class) {
871 return copyOf(((int[]) array));
872 }
873 if (array.getClass() == long[].class) {
874 return copyOf(((long[]) array));
875 }
876 if (array.getClass() == short[].class) {
877 return copyOf(((short[]) array));
878 }
879 final int len = Array.getLength(array);
880 final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
881 for (int i = (len- 1); (i >= 0); i--) {
882 Array.set(copy, i, copyOf(Array.get(array, i)));
883 }
884 return copy;
885 }
886 return null;
887 }
888
889
890
891
892
893
894
895
896
897 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
898 private static boolean[] copyOf(final boolean[] array) {
899
900 if (array!= null) {
901 final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
902 System.arraycopy(array, 0, copy, 0, array.length);
903 return copy;
904 }
905 return null;
906 }
907
908
909
910
911
912
913
914
915
916 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
917 private static byte[] copyOf(final byte[] array) {
918
919 if (array!= null) {
920 final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
921 System.arraycopy(array, 0, copy, 0, array.length);
922 return copy;
923 }
924 return null;
925 }
926
927
928
929
930
931
932
933
934
935 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
936 private static char[] copyOf(final char[] array) {
937
938 if (array!= null) {
939 final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
940 System.arraycopy(array, 0, copy, 0, array.length);
941 return copy;
942 }
943 return null;
944 }
945
946
947
948
949
950
951
952
953
954 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
955 private static double[] copyOf(final double[] array) {
956
957 if (array!= null) {
958 final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
959 System.arraycopy(array, 0, copy, 0, array.length);
960 return copy;
961 }
962 return null;
963 }
964
965
966
967
968
969
970
971
972
973 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
974 private static float[] copyOf(final float[] array) {
975
976 if (array!= null) {
977 final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
978 System.arraycopy(array, 0, copy, 0, array.length);
979 return copy;
980 }
981 return null;
982 }
983
984
985
986
987
988
989
990
991
992 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
993 private static int[] copyOf(final int[] array) {
994
995 if (array!= null) {
996 final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
997 System.arraycopy(array, 0, copy, 0, array.length);
998 return copy;
999 }
1000 return null;
1001 }
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1012 private static long[] copyOf(final long[] array) {
1013
1014 if (array!= null) {
1015 final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
1016 System.arraycopy(array, 0, copy, 0, array.length);
1017 return copy;
1018 }
1019 return null;
1020 }
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1031 private static short[] copyOf(final short[] array) {
1032
1033 if (array!= null) {
1034 final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
1035 System.arraycopy(array, 0, copy, 0, array.length);
1036 return copy;
1037 }
1038 return null;
1039 }
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049 @SuppressWarnings("unchecked")
1050 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1051 private static JAXBElement copyOf(final JAXBElement element) {
1052
1053 if (element!= null) {
1054 final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
1055 copy.setNil(element.isNil());
1056 copy.setValue(copyOf(copy.getValue()));
1057 return copy;
1058 }
1059 return null;
1060 }
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1071 private static Serializable copyOf(final Serializable serializable) {
1072
1073 if (serializable!= null) {
1074 try {
1075 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
1076 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
1077 out.writeObject(serializable);
1078 out.close();
1079 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
1080 final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
1081 final Serializable copy = ((Serializable) in.readObject());
1082 in.close();
1083 return copy;
1084 } catch (SecurityException e) {
1085 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1086 } catch (ClassNotFoundException e) {
1087 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1088 } catch (InvalidClassException e) {
1089 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1090 } catch (NotSerializableException e) {
1091 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1092 } catch (StreamCorruptedException e) {
1093 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1094 } catch (OptionalDataException e) {
1095 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1096 } catch (IOException e) {
1097 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1098 }
1099 }
1100 return null;
1101 }
1102
1103
1104
1105
1106
1107
1108
1109
1110 @Override
1111 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1112 public Implementation clone() {
1113 {
1114
1115 final Implementation clone = ((Implementation) super.clone());
1116
1117 clone.specifications = ((this.specifications == null)?null:((this.getSpecifications() == null)?null:this.getSpecifications().clone()));
1118
1119 clone.implementations = ((this.implementations == null)?null:((this.getImplementations() == null)?null:this.getImplementations().clone()));
1120
1121 clone.dependencies = ((this.dependencies == null)?null:((this.getDependencies() == null)?null:this.getDependencies().clone()));
1122
1123 clone.properties = ((this.properties == null)?null:((this.getProperties() == null)?null:this.getProperties().clone()));
1124
1125 clone.messages = ((this.messages == null)?null:((this.getMessages() == null)?null:this.getMessages().clone()));
1126
1127 if (this.any!= null) {
1128 clone.any = null;
1129 copyAny(this.getAny(), clone.getAny());
1130 }
1131
1132 clone.identifier = ((this.identifier == null)?null:this.getIdentifier());
1133
1134 clone.name = ((this.name == null)?null:this.getName());
1135
1136 clone.clazz = ((this.clazz == null)?null:this.getClazz());
1137
1138 clone.location = ((this.location == null)?null:this.getLocation());
1139
1140 clone.vendor = ((this.vendor == null)?null:this.getVendor());
1141
1142 clone.version = ((this.version == null)?null:this.getVersion());
1143
1144 clone._final = ((this._final == null)?null:this.isFinal());
1145
1146 clone.stateless = ((this.stateless == null)?null:this.isStateless());
1147
1148 clone._abstract = ((this._abstract == null)?null:this.isAbstract());
1149
1150 clone.classDeclaration = ((this.classDeclaration == null)?null:this.isClassDeclaration());
1151 return clone;
1152 }
1153 }
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172 public Class<?> getJavaClass( final ClassLoader classLoader )
1173 throws ClassNotFoundException, ModelObjectException
1174 {
1175 Class<?> javaClass = null;
1176 final JavaTypeName javaTypeName = this.getJavaTypeName();
1177
1178 if ( javaTypeName != null )
1179 {
1180 javaClass = javaTypeName.getClass( classLoader, false );
1181 }
1182
1183 return javaClass;
1184 }
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198 public JavaTypeName getJavaTypeName() throws ModelObjectException
1199 {
1200 try
1201 {
1202 JavaTypeName javaTypeName = null;
1203
1204 if ( this.getClazz() != null )
1205 {
1206 javaTypeName = JavaTypeName.parse( this.getClazz() );
1207 }
1208
1209 return javaTypeName;
1210 }
1211 catch ( final java.text.ParseException e )
1212 {
1213 throw new ModelObjectException( getMessage( "javaTypeNameParseException", this.getClazz(),
1214 getMessage( e ) ), e );
1215
1216 }
1217 }
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229 public java.net.URI getLocationUri() throws ModelObjectException
1230 {
1231 try
1232 {
1233 java.net.URI javaLocation = null;
1234
1235 if ( this.getLocation() != null )
1236 {
1237 javaLocation = new java.net.URI( this.getLocation() );
1238 }
1239
1240 return javaLocation;
1241 }
1242 catch ( final java.net.URISyntaxException e )
1243 {
1244 throw new ModelObjectException( getMessage( "uriSyntaxException", this.getLocation(),
1245 getMessage( e ) ), e );
1246
1247 }
1248 }
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268 @Deprecated
1269 public javax.xml.bind.JAXBElement getAnyElement( final String namespaceURI, final String localPart )
1270 {
1271 return this.getAnyElement( this.getAny(), namespaceURI, localPart );
1272 }
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291 @Deprecated
1292 public java.util.List<javax.xml.bind.JAXBElement> getAnyElements( final String namespaceURI,
1293 final String localPart )
1294 {
1295 return this.getAnyElements( this.getAny(), namespaceURI, localPart );
1296 }
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317 public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
1318 final Class<T> type )
1319 {
1320 return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
1321 }
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341 public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
1342 final String localPart,
1343 final Class<T> type )
1344 {
1345 return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
1346 }
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362 public <T> T getAnyObject( final Class<T> clazz )
1363 {
1364 return this.getAnyObject( this.getAny(), clazz );
1365 }
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380 public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
1381 {
1382 return this.getAnyObjects( this.getAny(), clazz );
1383 }
1384
1385 private static String getMessage( final Throwable t )
1386 {
1387 return t != null
1388 ? t.getMessage() != null && t.getMessage().trim().length() > 0
1389 ? t.getMessage()
1390 : getMessage( t.getCause() )
1391 : null;
1392
1393 }
1394
1395 private static String getMessage( final String key, final Object... arguments )
1396 {
1397 return java.text.MessageFormat.format( java.util.ResourceBundle.getBundle(
1398 Implementation.class.getName().replace( '.', '/' ), java.util.Locale.getDefault() ).
1399 getString( key ), arguments );
1400
1401 }
1402
1403 }