1
2
3
4
5
6
7
8
9 package org.jomc.tools.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.datatype.Duration;
50 import javax.xml.datatype.XMLGregorianCalendar;
51 import javax.xml.namespace.QName;
52 import org.jomc.model.Inheritable;
53 import org.w3c.dom.Element;
54
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 @XmlAccessorType(XmlAccessType.FIELD)
87 @XmlType(name = "SourceFileType", namespace = "http://jomc.org/tools/model", propOrder = {
88 "sourceSections",
89 "templateParameter",
90 "any"
91 })
92 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
93 public class SourceFileType
94 extends ToolsType
95 implements Cloneable, Inheritable
96 {
97
98 @XmlElement(name = "source-sections", namespace = "http://jomc.org/tools/model")
99 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
100 protected SourceSectionsType sourceSections;
101 @XmlElement(name = "template-parameter", namespace = "http://jomc.org/tools/model")
102 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
103 protected List<TemplateParameterType> templateParameter;
104 @XmlAnyElement(lax = true)
105 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
106 protected List<Object> any;
107 @XmlAttribute(name = "identifier", required = true)
108 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
109 protected String identifier;
110 @XmlAttribute(name = "location")
111 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
112 protected String location;
113 @XmlAttribute(name = "template")
114 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
115 protected String template;
116 @XmlAttribute(name = "head-comment")
117 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
118 protected String headComment;
119 @XmlAttribute(name = "tail-comment")
120 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
121 protected String tailComment;
122 @XmlAttribute(name = "final")
123 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
124 protected Boolean _final;
125 @XmlAttribute(name = "override")
126 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
127 protected Boolean override;
128
129
130
131
132
133 public SourceFileType() {
134
135 super();
136 }
137
138
139
140
141
142
143
144
145
146
147 public SourceFileType(final SourceFileType o) {
148
149 super(o);
150 if (o == null) {
151 throw new NullPointerException("Cannot create a copy of 'SourceFileType' from 'null'.");
152 }
153
154 this.sourceSections = ((o.sourceSections == null)?null:((o.getSourceSections() == null)?null:o.getSourceSections().clone()));
155
156 if (o.templateParameter!= null) {
157 copyTemplateParameter(o.getTemplateParameter(), this.getTemplateParameter());
158 }
159
160 if (o.any!= null) {
161 copyAny(o.getAny(), this.getAny());
162 }
163
164 this.identifier = ((o.identifier == null)?null:o.getIdentifier());
165
166 this.location = ((o.location == null)?null:o.getLocation());
167
168 this.template = ((o.template == null)?null:o.getTemplate());
169
170 this.headComment = ((o.headComment == null)?null:o.getHeadComment());
171
172 this.tailComment = ((o.tailComment == null)?null:o.getTailComment());
173
174 this._final = ((o._final == null)?null:o.isFinal());
175
176 this.override = ((o.override == null)?null:o.isOverride());
177 }
178
179
180
181
182
183
184
185
186
187 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
188 public SourceSectionsType getSourceSections() {
189 return sourceSections;
190 }
191
192
193
194
195
196
197
198
199
200 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
201 public void setSourceSections(SourceSectionsType value) {
202 this.sourceSections = value;
203 }
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
228 public List<TemplateParameterType> getTemplateParameter() {
229 if (templateParameter == null) {
230 templateParameter = new ArrayList<TemplateParameterType>();
231 }
232 return this.templateParameter;
233 }
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
259 public List<Object> getAny() {
260 if (any == null) {
261 any = new ArrayList<Object>();
262 }
263 return this.any;
264 }
265
266
267
268
269
270
271
272
273
274 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
275 public String getIdentifier() {
276 return identifier;
277 }
278
279
280
281
282
283
284
285
286
287 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
288 public void setIdentifier(String value) {
289 this.identifier = value;
290 }
291
292
293
294
295
296
297
298
299
300 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
301 public String getLocation() {
302 return location;
303 }
304
305
306
307
308
309
310
311
312
313 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
314 public void setLocation(String value) {
315 this.location = value;
316 }
317
318
319
320
321
322
323
324
325
326 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
327 public String getTemplate() {
328 return template;
329 }
330
331
332
333
334
335
336
337
338
339 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
340 public void setTemplate(String value) {
341 this.template = value;
342 }
343
344
345
346
347
348
349
350
351
352 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
353 public String getHeadComment() {
354 return headComment;
355 }
356
357
358
359
360
361
362
363
364
365 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
366 public void setHeadComment(String value) {
367 this.headComment = value;
368 }
369
370
371
372
373
374
375
376
377
378 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
379 public String getTailComment() {
380 return tailComment;
381 }
382
383
384
385
386
387
388
389
390
391 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
392 public void setTailComment(String value) {
393 this.tailComment = value;
394 }
395
396
397
398
399
400
401
402
403
404 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
405 public boolean isFinal() {
406 if (_final == null) {
407 return false;
408 } else {
409 return _final;
410 }
411 }
412
413
414
415
416
417
418
419
420
421 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
422 public void setFinal(Boolean value) {
423 this._final = value;
424 }
425
426
427
428
429
430
431
432
433
434 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
435 public boolean isOverride() {
436 if (override == null) {
437 return false;
438 } else {
439 return override;
440 }
441 }
442
443
444
445
446
447
448
449
450
451 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
452 public void setOverride(Boolean value) {
453 this.override = value;
454 }
455
456
457
458
459
460
461
462
463
464
465
466 @SuppressWarnings("unchecked")
467 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
468 private static void copyTemplateParameter(final List<TemplateParameterType> source, final List<TemplateParameterType> target) {
469
470 if ((source!= null)&&(!source.isEmpty())) {
471 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
472 final Object next = it.next();
473 if (next instanceof TemplateParameterType) {
474
475 target.add(((TemplateParameterType) next).clone());
476 continue;
477 }
478
479 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'TemplateParameter' of class 'org.jomc.tools.model.SourceFileType'."));
480 }
481 }
482 }
483
484
485
486
487
488
489
490
491
492
493
494 @SuppressWarnings("unchecked")
495 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
496 private static void copyAny(final List<Object> source, final List<Object> target) {
497
498 if ((source!= null)&&(!source.isEmpty())) {
499 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
500 final Object next = it.next();
501 if (next instanceof Element) {
502
503 target.add(((Element)((Element) next).cloneNode(true)));
504 continue;
505 }
506 if (next instanceof Object) {
507
508 target.add(copyOf(((Object) next)));
509 continue;
510 }
511
512 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.tools.model.SourceFileType'."));
513 }
514 }
515 }
516
517
518
519
520
521
522
523
524
525 @SuppressWarnings("unchecked")
526 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
527 private static Object copyOf(final Object o) {
528
529 try {
530 if (o!= null) {
531 if (o.getClass().isPrimitive()) {
532 return o;
533 }
534 if (o.getClass().isArray()) {
535 return copyOfArray(o);
536 }
537
538 if (o instanceof Boolean) {
539 return o;
540 }
541 if (o instanceof Byte) {
542 return o;
543 }
544 if (o instanceof Character) {
545 return o;
546 }
547 if (o instanceof Double) {
548 return o;
549 }
550 if (o instanceof Enum) {
551 return o;
552 }
553 if (o instanceof Float) {
554 return o;
555 }
556 if (o instanceof Integer) {
557 return o;
558 }
559 if (o instanceof Long) {
560 return o;
561 }
562 if (o instanceof Short) {
563 return o;
564 }
565 if (o instanceof String) {
566 return o;
567 }
568 if (o instanceof BigDecimal) {
569 return o;
570 }
571 if (o instanceof BigInteger) {
572 return o;
573 }
574 if (o instanceof UUID) {
575 return o;
576 }
577 if (o instanceof QName) {
578 return o;
579 }
580 if (o instanceof Duration) {
581 return o;
582 }
583 if (o instanceof Currency) {
584 return o;
585 }
586
587 if (o instanceof File) {
588 return new File(o.toString());
589 }
590 if (o instanceof URI) {
591 return new URI(o.toString());
592 }
593 if (o instanceof URL) {
594 return new URL(o.toString());
595 }
596 if (o instanceof MimeType) {
597 return new MimeType(o.toString());
598 }
599
600 if (o instanceof XMLGregorianCalendar) {
601 return ((XMLGregorianCalendar) o).clone();
602 }
603 if (o instanceof Date) {
604 return ((Date) o).clone();
605 }
606 if (o instanceof Calendar) {
607 return ((Calendar) o).clone();
608 }
609 if (o instanceof TimeZone) {
610 return ((TimeZone) o).clone();
611 }
612 if (o instanceof Locale) {
613 return ((Locale) o).clone();
614 }
615 if (o instanceof Element) {
616 return ((Element)((Element) o).cloneNode(true));
617 }
618 if (o instanceof JAXBElement) {
619 return copyOf(((JAXBElement) o));
620 }
621 try {
622 return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
623 } catch (NoSuchMethodException e) {
624 if (o instanceof Serializable) {
625 return copyOf(((Serializable) o));
626 }
627
628 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
629 } catch (IllegalAccessException e) {
630
631 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
632 } catch (InvocationTargetException e) {
633
634 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
635 } catch (SecurityException e) {
636
637 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
638 } catch (IllegalArgumentException e) {
639
640 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
641 } catch (ExceptionInInitializerError e) {
642
643 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
644 }
645 }
646 return null;
647 } catch (MimeTypeParseException e) {
648 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
649 } catch (MalformedURLException e) {
650 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
651 } catch (URISyntaxException e) {
652 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
653 }
654 }
655
656
657
658
659
660
661
662
663
664 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
665 private static Object copyOfArray(final Object array) {
666
667 if (array!= null) {
668 if (array.getClass() == boolean[].class) {
669 return copyOf(((boolean[]) array));
670 }
671 if (array.getClass() == byte[].class) {
672 return copyOf(((byte[]) array));
673 }
674 if (array.getClass() == char[].class) {
675 return copyOf(((char[]) array));
676 }
677 if (array.getClass() == double[].class) {
678 return copyOf(((double[]) array));
679 }
680 if (array.getClass() == float[].class) {
681 return copyOf(((float[]) array));
682 }
683 if (array.getClass() == int[].class) {
684 return copyOf(((int[]) array));
685 }
686 if (array.getClass() == long[].class) {
687 return copyOf(((long[]) array));
688 }
689 if (array.getClass() == short[].class) {
690 return copyOf(((short[]) array));
691 }
692 final int len = Array.getLength(array);
693 final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
694 for (int i = (len- 1); (i >= 0); i--) {
695 Array.set(copy, i, copyOf(Array.get(array, i)));
696 }
697 return copy;
698 }
699 return null;
700 }
701
702
703
704
705
706
707
708
709
710 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
711 private static boolean[] copyOf(final boolean[] array) {
712
713 if (array!= null) {
714 final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
715 System.arraycopy(array, 0, copy, 0, array.length);
716 return copy;
717 }
718 return null;
719 }
720
721
722
723
724
725
726
727
728
729 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
730 private static byte[] copyOf(final byte[] array) {
731
732 if (array!= null) {
733 final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
734 System.arraycopy(array, 0, copy, 0, array.length);
735 return copy;
736 }
737 return null;
738 }
739
740
741
742
743
744
745
746
747
748 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
749 private static char[] copyOf(final char[] array) {
750
751 if (array!= null) {
752 final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
753 System.arraycopy(array, 0, copy, 0, array.length);
754 return copy;
755 }
756 return null;
757 }
758
759
760
761
762
763
764
765
766
767 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
768 private static double[] copyOf(final double[] array) {
769
770 if (array!= null) {
771 final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
772 System.arraycopy(array, 0, copy, 0, array.length);
773 return copy;
774 }
775 return null;
776 }
777
778
779
780
781
782
783
784
785
786 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
787 private static float[] copyOf(final float[] array) {
788
789 if (array!= null) {
790 final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
791 System.arraycopy(array, 0, copy, 0, array.length);
792 return copy;
793 }
794 return null;
795 }
796
797
798
799
800
801
802
803
804
805 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
806 private static int[] copyOf(final int[] array) {
807
808 if (array!= null) {
809 final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
810 System.arraycopy(array, 0, copy, 0, array.length);
811 return copy;
812 }
813 return null;
814 }
815
816
817
818
819
820
821
822
823
824 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
825 private static long[] copyOf(final long[] array) {
826
827 if (array!= null) {
828 final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
829 System.arraycopy(array, 0, copy, 0, array.length);
830 return copy;
831 }
832 return null;
833 }
834
835
836
837
838
839
840
841
842
843 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
844 private static short[] copyOf(final short[] array) {
845
846 if (array!= null) {
847 final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
848 System.arraycopy(array, 0, copy, 0, array.length);
849 return copy;
850 }
851 return null;
852 }
853
854
855
856
857
858
859
860
861
862 @SuppressWarnings("unchecked")
863 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
864 private static JAXBElement copyOf(final JAXBElement element) {
865
866 if (element!= null) {
867 final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
868 copy.setNil(element.isNil());
869 copy.setValue(copyOf(copy.getValue()));
870 return copy;
871 }
872 return null;
873 }
874
875
876
877
878
879
880
881
882
883 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
884 private static Serializable copyOf(final Serializable serializable) {
885
886 if (serializable!= null) {
887 try {
888 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
889 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
890 out.writeObject(serializable);
891 out.close();
892 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
893 final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
894 final Serializable copy = ((Serializable) in.readObject());
895 in.close();
896 return copy;
897 } catch (SecurityException e) {
898 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
899 } catch (ClassNotFoundException e) {
900 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
901 } catch (InvalidClassException e) {
902 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
903 } catch (NotSerializableException e) {
904 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
905 } catch (StreamCorruptedException e) {
906 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
907 } catch (OptionalDataException e) {
908 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
909 } catch (IOException e) {
910 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
911 }
912 }
913 return null;
914 }
915
916
917
918
919
920
921
922
923 @Override
924 @Generated(value = "com.sun.tools.xjc.Driver", date = "2015-05-31T05:43:54+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
925 public SourceFileType clone() {
926 {
927
928 final SourceFileType clone = ((SourceFileType) super.clone());
929
930 clone.sourceSections = ((this.sourceSections == null)?null:((this.getSourceSections() == null)?null:this.getSourceSections().clone()));
931
932 if (this.templateParameter!= null) {
933 clone.templateParameter = null;
934 copyTemplateParameter(this.getTemplateParameter(), clone.getTemplateParameter());
935 }
936
937 if (this.any!= null) {
938 clone.any = null;
939 copyAny(this.getAny(), clone.getAny());
940 }
941
942 clone.identifier = ((this.identifier == null)?null:this.getIdentifier());
943
944 clone.location = ((this.location == null)?null:this.getLocation());
945
946 clone.template = ((this.template == null)?null:this.getTemplate());
947
948 clone.headComment = ((this.headComment == null)?null:this.getHeadComment());
949
950 clone.tailComment = ((this.tailComment == null)?null:this.getTailComment());
951
952 clone._final = ((this._final == null)?null:this.isFinal());
953
954 clone.override = ((this.override == null)?null:this.isOverride());
955 return clone;
956 }
957 }
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976 public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
977 final Class<T> type )
978 {
979 return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
980 }
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998 public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
999 final String localPart,
1000 final Class<T> type )
1001 {
1002 return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
1003 }
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019 public <T> T getAnyObject( final Class<T> clazz )
1020 {
1021 return this.getAnyObject( this.getAny(), clazz );
1022 }
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037 public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
1038 {
1039 return this.getAnyObjects( this.getAny(), clazz );
1040 }
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055 public TemplateParameterType getTemplateParameter( final String name )
1056 {
1057 if ( name == null )
1058 {
1059 throw new NullPointerException( "name" );
1060 }
1061
1062 for ( int i = 0, s0 = this.getTemplateParameter().size(); i < s0; i++ )
1063 {
1064 final TemplateParameterType t = this.getTemplateParameter().get( i );
1065
1066 if ( name.equals( t.getName() ) )
1067 {
1068 return t;
1069 }
1070 }
1071
1072 return null;
1073 }
1074
1075 }