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