001 //
002 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
003 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
004 // Any modifications to this file will be lost upon recompilation of the source schema.
005 // Generated on: 2009.09.21 at 10:35:38 PM UTC
006 //
007
008
009 package org.jomc.model;
010
011 import java.io.ByteArrayInputStream;
012 import java.io.ByteArrayOutputStream;
013 import java.io.IOException;
014 import java.io.InvalidClassException;
015 import java.io.NotSerializableException;
016 import java.io.ObjectInputStream;
017 import java.io.ObjectOutputStream;
018 import java.io.OptionalDataException;
019 import java.io.Serializable;
020 import java.io.StreamCorruptedException;
021 import java.lang.reflect.Array;
022 import java.lang.reflect.InvocationTargetException;
023 import java.math.BigDecimal;
024 import java.math.BigInteger;
025 import java.util.ArrayList;
026 import java.util.Calendar;
027 import java.util.Currency;
028 import java.util.Date;
029 import java.util.Iterator;
030 import java.util.List;
031 import java.util.Locale;
032 import java.util.TimeZone;
033 import java.util.UUID;
034 import javax.annotation.Generated;
035 import javax.xml.bind.JAXBElement;
036 import javax.xml.bind.annotation.XmlAccessType;
037 import javax.xml.bind.annotation.XmlAccessorType;
038 import javax.xml.bind.annotation.XmlAnyElement;
039 import javax.xml.bind.annotation.XmlAttribute;
040 import javax.xml.bind.annotation.XmlSchemaType;
041 import javax.xml.bind.annotation.XmlType;
042 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
043 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
044 import javax.xml.datatype.Duration;
045 import javax.xml.datatype.XMLGregorianCalendar;
046 import javax.xml.namespace.QName;
047 import org.w3c.dom.Element;
048
049
050 /**
051 * Model of an implementation.
052 * <p>An implementation consists of the properties {@code identifier}, {@code name},
053 * {@code class}, {@code location}, {@code description}, {@code vendor} and
054 * {@code version}. Property {@code identifier} holds an identifier uniquely
055 * identifying the implementation in a set of implementations. Property
056 * {@code name} holds a name of the implementation uniquely identifying the
057 * implementation for its specifications. Property {@code class} holds the name of
058 * the class providing implementation instances. Property {@code location} holds an
059 * URI of the location of instances of the implementation. Property
060 * {@code description} holds a textual description. Property {@code vendor} holds
061 * vendor information for the vendor providing the implementation. Property
062 * {@code version} holds a textual version of the implementation.</p>
063 *
064 * <p>Dependencies, messages, properties and specifications may be inherited from a
065 * {@code parent}. Property {@code final} flags an implementation as the final node
066 * in an inheritance hierarchy.</p>
067 *
068 * <p>The {@code stateless} flag indicates that instances of the implementation
069 * do not retain state across operations.</p>
070 *
071 *
072 *
073 */
074 @XmlAccessorType(XmlAccessType.FIELD)
075 @XmlType(name = "Implementation", propOrder = {
076 "specifications",
077 "dependencies",
078 "properties",
079 "messages",
080 "any"
081 })
082 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
083 public class Implementation
084 extends ModelObject
085 implements Cloneable
086 {
087
088 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
089 protected Specifications specifications;
090 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
091 protected Dependencies dependencies;
092 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
093 protected Properties properties;
094 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
095 protected Messages messages;
096 @XmlAnyElement(lax = true)
097 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
098 protected List<Object> any;
099 @XmlAttribute(required = true)
100 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
101 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
102 protected String identifier;
103 @XmlAttribute(required = true)
104 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
105 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
106 protected String name;
107 @XmlAttribute(name = "class")
108 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
109 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
110 protected String clazz;
111 @XmlAttribute
112 @XmlSchemaType(name = "anyURI")
113 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
114 protected String location;
115 @XmlAttribute
116 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
117 protected String vendor;
118 @XmlAttribute
119 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
120 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
121 protected String version;
122 @XmlAttribute
123 @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
124 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
125 protected String parent;
126 @XmlAttribute(name = "final")
127 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
128 protected Boolean _final;
129 @XmlAttribute
130 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
131 protected Boolean stateless;
132
133 /**
134 * Creates a new {@code Implementation} instance.
135 *
136 */
137 public Implementation() {
138 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
139 super();
140 }
141
142 /**
143 * Creates a new {@code Implementation} instance by deeply copying a given instance.
144 *
145 * @param o
146 * The instance to copy or {@code null}.
147 */
148 public Implementation(final Implementation o) {
149 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
150 super(o);
151 if (o!= null) {
152 {
153 // CClassInfo: org.jomc.model.Specifications
154 this.specifications = ((((Specifications) o.getSpecifications()) == null)?null:((Specifications) o.getSpecifications()).clone());
155 // CClassInfo: org.jomc.model.Dependencies
156 this.dependencies = ((((Dependencies) o.getDependencies()) == null)?null:((Dependencies) o.getDependencies()).clone());
157 // CClassInfo: org.jomc.model.Properties
158 this.properties = ((((Properties) o.getProperties()) == null)?null:((Properties) o.getProperties()).clone());
159 // CClassInfo: org.jomc.model.Messages
160 this.messages = ((((Messages) o.getMessages()) == null)?null:((Messages) o.getMessages()).clone());
161 // 'Any' collection.
162 copyAny(o.getAny(), getAny());
163 // CBuiltinLeafInfo: java.lang.String
164 this.identifier = ((String) o.getIdentifier());
165 // CBuiltinLeafInfo: java.lang.String
166 this.name = ((String) o.getName());
167 // CBuiltinLeafInfo: java.lang.String
168 this.clazz = ((String) o.getClazz());
169 // CBuiltinLeafInfo: java.lang.String
170 this.location = ((String) o.getLocation());
171 // CBuiltinLeafInfo: java.lang.String
172 this.vendor = ((String) o.getVendor());
173 // CBuiltinLeafInfo: java.lang.String
174 this.version = ((String) o.getVersion());
175 // CBuiltinLeafInfo: java.lang.String
176 this.parent = ((String) o.getParent());
177 // CBuiltinLeafInfo: java.lang.Boolean
178 this._final = ((Boolean) o.isFinal());
179 // CBuiltinLeafInfo: java.lang.Boolean
180 this.stateless = ((Boolean) o.isStateless());
181 }
182 }
183 }
184
185 /**
186 * Specifications implemented by this implementation.
187 *
188 * @return
189 * possible object is
190 * {@link Specifications }
191 *
192 */
193 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
194 public Specifications getSpecifications() {
195 return specifications;
196 }
197
198 /**
199 * Sets the value of the specifications property.
200 *
201 * @param value
202 * allowed object is
203 * {@link Specifications }
204 *
205 */
206 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
207 public void setSpecifications(Specifications value) {
208 this.specifications = value;
209 }
210
211 /**
212 * Dependencies of this implementation.
213 *
214 * @return
215 * possible object is
216 * {@link Dependencies }
217 *
218 */
219 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
220 public Dependencies getDependencies() {
221 return dependencies;
222 }
223
224 /**
225 * Sets the value of the dependencies property.
226 *
227 * @param value
228 * allowed object is
229 * {@link Dependencies }
230 *
231 */
232 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
233 public void setDependencies(Dependencies value) {
234 this.dependencies = value;
235 }
236
237 /**
238 * Properties of this implementation.
239 *
240 * @return
241 * possible object is
242 * {@link Properties }
243 *
244 */
245 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
246 public Properties getProperties() {
247 return properties;
248 }
249
250 /**
251 * Sets the value of the properties property.
252 *
253 * @param value
254 * allowed object is
255 * {@link Properties }
256 *
257 */
258 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
259 public void setProperties(Properties value) {
260 this.properties = value;
261 }
262
263 /**
264 * Messages of this implementation.
265 *
266 * @return
267 * possible object is
268 * {@link Messages }
269 *
270 */
271 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
272 public Messages getMessages() {
273 return messages;
274 }
275
276 /**
277 * Sets the value of the messages property.
278 *
279 * @param value
280 * allowed object is
281 * {@link Messages }
282 *
283 */
284 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
285 public void setMessages(Messages value) {
286 this.messages = value;
287 }
288
289 /**
290 * Gets the value of the any property.
291 *
292 * <p>
293 * This accessor method returns a reference to the live list,
294 * not a snapshot. Therefore any modification you make to the
295 * returned list will be present inside the JAXB object.
296 * This is why there is not a <CODE>set</CODE> method for the any property.
297 *
298 * <p>
299 * For example, to add a new item, do as follows:
300 * <pre>
301 * getAny().add(newItem);
302 * </pre>
303 *
304 *
305 * <p>
306 * Objects of the following type(s) are allowed in the list
307 * {@link Element }
308 * {@link Object }
309 *
310 *
311 */
312 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
313 public List<Object> getAny() {
314 if (any == null) {
315 any = new ArrayList<Object>();
316 }
317 return this.any;
318 }
319
320 /**
321 * The identifier of this implementation.
322 *
323 * @return
324 * possible object is
325 * {@link String }
326 *
327 */
328 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
329 public String getIdentifier() {
330 return identifier;
331 }
332
333 /**
334 * Sets the value of the identifier property.
335 *
336 * @param value
337 * allowed object is
338 * {@link String }
339 *
340 */
341 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
342 public void setIdentifier(String value) {
343 this.identifier = value;
344 }
345
346 /**
347 * The name of this implementation.
348 *
349 * @return
350 * possible object is
351 * {@link String }
352 *
353 */
354 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
355 public String getName() {
356 return name;
357 }
358
359 /**
360 * Sets the value of the name property.
361 *
362 * @param value
363 * allowed object is
364 * {@link String }
365 *
366 */
367 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
368 public void setName(String value) {
369 this.name = value;
370 }
371
372 /**
373 * The name of the class providing instances of this implementation or {@code null}.
374 *
375 * @return
376 * possible object is
377 * {@link String }
378 *
379 */
380 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
381 public String getClazz() {
382 return clazz;
383 }
384
385 /**
386 * Sets the value of the clazz property.
387 *
388 * @param value
389 * allowed object is
390 * {@link String }
391 *
392 */
393 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
394 public void setClazz(String value) {
395 this.clazz = value;
396 }
397
398 /**
399 * An URI of the location providing instances of this implementation or {@code null}.
400 *
401 * @return
402 * possible object is
403 * {@link String }
404 *
405 */
406 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
407 public String getLocation() {
408 return location;
409 }
410
411 /**
412 * Sets the value of the location property.
413 *
414 * @param value
415 * allowed object is
416 * {@link String }
417 *
418 */
419 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
420 public void setLocation(String value) {
421 this.location = value;
422 }
423
424 /**
425 * The presentation vendor of this implementation or {@code null}.
426 *
427 * @return
428 * possible object is
429 * {@link String }
430 *
431 */
432 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
433 public String getVendor() {
434 return vendor;
435 }
436
437 /**
438 * Sets the value of the vendor property.
439 *
440 * @param value
441 * allowed object is
442 * {@link String }
443 *
444 */
445 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
446 public void setVendor(String value) {
447 this.vendor = value;
448 }
449
450 /**
451 * The version of this implementation or {@code null}.
452 *
453 * @return
454 * possible object is
455 * {@link String }
456 *
457 */
458 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
459 public String getVersion() {
460 return version;
461 }
462
463 /**
464 * Sets the value of the version property.
465 *
466 * @param value
467 * allowed object is
468 * {@link String }
469 *
470 */
471 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
472 public void setVersion(String value) {
473 this.version = value;
474 }
475
476 /**
477 * Identifier of an implementation this implementation inherits from or {@code null}.
478 * When set, this implementation will inherit up the hierarchy starting at that parent.
479 *
480 * @return
481 * possible object is
482 * {@link String }
483 *
484 */
485 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
486 public String getParent() {
487 return parent;
488 }
489
490 /**
491 * Sets the value of the parent property.
492 *
493 * @param value
494 * allowed object is
495 * {@link String }
496 *
497 */
498 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
499 public void setParent(String value) {
500 this.parent = value;
501 }
502
503 /**
504 * Flags this implementation the final node in an inheritance hierarchy.
505 *
506 * @return
507 * possible object is
508 * {@link Boolean }
509 *
510 */
511 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
512 public boolean isFinal() {
513 if (_final == null) {
514 return false;
515 } else {
516 return _final;
517 }
518 }
519
520 /**
521 * Sets the value of the final property.
522 *
523 * @param value
524 * allowed object is
525 * {@link Boolean }
526 *
527 */
528 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
529 public void setFinal(Boolean value) {
530 this._final = value;
531 }
532
533 /**
534 * Flags this implementation stateless.
535 *
536 * @return
537 * possible object is
538 * {@link Boolean }
539 *
540 */
541 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
542 public boolean isStateless() {
543 if (stateless == null) {
544 return false;
545 } else {
546 return stateless;
547 }
548 }
549
550 /**
551 * Sets the value of the stateless property.
552 *
553 * @param value
554 * allowed object is
555 * {@link Boolean }
556 *
557 */
558 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
559 public void setStateless(Boolean value) {
560 this.stateless = value;
561 }
562
563 /**
564 * Copies all values of property {@code Any} deeply.
565 *
566 * @param target
567 * The target to copy {@code source} to.
568 * @param source
569 * The source to copy from.
570 * @throws NullPointerException
571 * if {@code source} or {@code target} is {@code null}.
572 */
573 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
574 private static void copyAny(final List<Object> source, final List<Object> target) {
575 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
576 if (!source.isEmpty()) {
577 for (Iterator it = source.iterator(); it.hasNext(); ) {
578 final Object next = it.next();
579 if (next instanceof Element) {
580 // CWildcardTypeInfo: org.w3c.dom.Element
581 target.add(((Element)((Element) next).cloneNode(true)));
582 continue;
583 }
584 if (next instanceof Object) {
585 // CBuiltinLeafInfo: java.lang.Object
586 target.add(copyOfObject(((Object) next)));
587 continue;
588 }
589 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
590 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Implementation'."));
591 }
592 }
593 }
594
595 /**
596 * Creates and returns a deep copy of a given object.
597 *
598 * @param o
599 * The instance to copy or {@code null}.
600 * @return
601 * A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
602 */
603 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
604 private static Object copyOfObject(final Object o) {
605 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
606 if (o!= null) {
607 if (o.getClass().isPrimitive()) {
608 return o;
609 }
610 if (o.getClass().isArray()) {
611 return copyOfArray(o);
612 }
613 if (o instanceof Boolean) {
614 return o;
615 }
616 if (o instanceof Byte) {
617 return o;
618 }
619 if (o instanceof Character) {
620 return o;
621 }
622 if (o instanceof Double) {
623 return o;
624 }
625 if (o instanceof Enum) {
626 return o;
627 }
628 if (o instanceof Float) {
629 return o;
630 }
631 if (o instanceof Integer) {
632 return o;
633 }
634 if (o instanceof Long) {
635 return o;
636 }
637 if (o instanceof Short) {
638 return o;
639 }
640 if (o instanceof String) {
641 return o;
642 }
643 if (o instanceof BigDecimal) {
644 return o;
645 }
646 if (o instanceof BigInteger) {
647 return o;
648 }
649 if (o instanceof UUID) {
650 return o;
651 }
652 if (o instanceof QName) {
653 return o;
654 }
655 if (o instanceof Duration) {
656 return o;
657 }
658 if (o instanceof Currency) {
659 return o;
660 }
661 if (o instanceof XMLGregorianCalendar) {
662 return ((XMLGregorianCalendar) o).clone();
663 }
664 if (o instanceof Date) {
665 return ((Date) o).clone();
666 }
667 if (o instanceof Calendar) {
668 return ((Calendar) o).clone();
669 }
670 if (o instanceof TimeZone) {
671 return ((TimeZone) o).clone();
672 }
673 if (o instanceof Locale) {
674 return ((Locale) o).clone();
675 }
676 if (o instanceof Element) {
677 return ((Element)((Element) o).cloneNode(true));
678 }
679 if (o instanceof JAXBElement) {
680 return copyOFJAXBElement(((JAXBElement) o));
681 }
682 try {
683 return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
684 } catch (NoSuchMethodException e) {
685 if (o instanceof Serializable) {
686 return copyOfSerializable(((Serializable) o));
687 }
688 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
689 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
690 } catch (IllegalAccessException e) {
691 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
692 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
693 } catch (InvocationTargetException e) {
694 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
695 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
696 } catch (SecurityException e) {
697 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
698 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
699 } catch (IllegalArgumentException e) {
700 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
701 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
702 } catch (ExceptionInInitializerError e) {
703 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
704 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
705 }
706 }
707 return null;
708 }
709
710 /**
711 * Creates and returns a deep copy of a given array.
712 *
713 * @param array
714 * The array to copy or {@code null}.
715 * @return
716 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
717 */
718 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
719 private static Object copyOfArray(final Object array) {
720 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
721 if (array!= null) {
722 if (array.getClass() == boolean[].class) {
723 return copyOf(((boolean[]) array));
724 }
725 if (array.getClass() == byte[].class) {
726 return copyOf(((byte[]) array));
727 }
728 if (array.getClass() == char[].class) {
729 return copyOf(((char[]) array));
730 }
731 if (array.getClass() == double[].class) {
732 return copyOf(((double[]) array));
733 }
734 if (array.getClass() == float[].class) {
735 return copyOf(((float[]) array));
736 }
737 if (array.getClass() == int[].class) {
738 return copyOf(((int[]) array));
739 }
740 if (array.getClass() == long[].class) {
741 return copyOf(((long[]) array));
742 }
743 if (array.getClass() == short[].class) {
744 return copyOf(((short[]) array));
745 }
746 final int len = Array.getLength(array);
747 final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
748 for (int i = (len- 1); (i >= 0); i--) {
749 Array.set(copy, i, copyOfObject(Array.get(array, i)));
750 }
751 return copy;
752 }
753 return null;
754 }
755
756 /**
757 * Creates and returns a deep copy of a given array.
758 *
759 * @param array
760 * The array to copy or {@code null}.
761 * @return
762 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
763 */
764 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
765 private static boolean[] copyOf(final boolean[] array) {
766 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
767 if (array!= null) {
768 final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
769 System.arraycopy(array, 0, copy, 0, array.length);
770 return copy;
771 }
772 return null;
773 }
774
775 /**
776 * Creates and returns a deep copy of a given array.
777 *
778 * @param array
779 * The array to copy or {@code null}.
780 * @return
781 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
782 */
783 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
784 private static byte[] copyOf(final byte[] array) {
785 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
786 if (array!= null) {
787 final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
788 System.arraycopy(array, 0, copy, 0, array.length);
789 return copy;
790 }
791 return null;
792 }
793
794 /**
795 * Creates and returns a deep copy of a given array.
796 *
797 * @param array
798 * The array to copy or {@code null}.
799 * @return
800 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
801 */
802 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
803 private static char[] copyOf(final char[] array) {
804 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
805 if (array!= null) {
806 final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
807 System.arraycopy(array, 0, copy, 0, array.length);
808 return copy;
809 }
810 return null;
811 }
812
813 /**
814 * Creates and returns a deep copy of a given array.
815 *
816 * @param array
817 * The array to copy or {@code null}.
818 * @return
819 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
820 */
821 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
822 private static double[] copyOf(final double[] array) {
823 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
824 if (array!= null) {
825 final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
826 System.arraycopy(array, 0, copy, 0, array.length);
827 return copy;
828 }
829 return null;
830 }
831
832 /**
833 * Creates and returns a deep copy of a given array.
834 *
835 * @param array
836 * The array to copy or {@code null}.
837 * @return
838 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
839 */
840 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
841 private static float[] copyOf(final float[] array) {
842 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
843 if (array!= null) {
844 final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
845 System.arraycopy(array, 0, copy, 0, array.length);
846 return copy;
847 }
848 return null;
849 }
850
851 /**
852 * Creates and returns a deep copy of a given array.
853 *
854 * @param array
855 * The array to copy or {@code null}.
856 * @return
857 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
858 */
859 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
860 private static int[] copyOf(final int[] array) {
861 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
862 if (array!= null) {
863 final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
864 System.arraycopy(array, 0, copy, 0, array.length);
865 return copy;
866 }
867 return null;
868 }
869
870 /**
871 * Creates and returns a deep copy of a given array.
872 *
873 * @param array
874 * The array to copy or {@code null}.
875 * @return
876 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
877 */
878 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
879 private static long[] copyOf(final long[] array) {
880 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
881 if (array!= null) {
882 final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
883 System.arraycopy(array, 0, copy, 0, array.length);
884 return copy;
885 }
886 return null;
887 }
888
889 /**
890 * Creates and returns a deep copy of a given array.
891 *
892 * @param array
893 * The array to copy or {@code null}.
894 * @return
895 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
896 */
897 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
898 private static short[] copyOf(final short[] array) {
899 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
900 if (array!= null) {
901 final short[] copy = ((short[]) 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 * Creates and returns a deep copy of a given {@code JAXBElement} instance.
910 *
911 * @param element
912 * The instance to copy or {@code null}.
913 * @return
914 * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
915 */
916 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
917 private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
918 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
919 if (element!= null) {
920 final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
921 copy.setNil(element.isNil());
922 copy.setValue(copyOfObject(copy.getValue()));
923 return copy;
924 }
925 return null;
926 }
927
928 /**
929 * Creates and returns a deep copy of a given {@code Serializable}.
930 *
931 * @param serializable
932 * The instance to copy or {@code null}.
933 * @return
934 * A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
935 */
936 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
937 private static Serializable copyOfSerializable(final Serializable serializable) {
938 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
939 if (serializable!= null) {
940 try {
941 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
942 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
943 out.writeObject(serializable);
944 out.close();
945 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
946 final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
947 final Serializable copy = ((Serializable) in.readObject());
948 in.close();
949 return copy;
950 } catch (SecurityException e) {
951 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
952 } catch (ClassNotFoundException e) {
953 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
954 } catch (InvalidClassException e) {
955 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
956 } catch (NotSerializableException e) {
957 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
958 } catch (StreamCorruptedException e) {
959 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
960 } catch (OptionalDataException e) {
961 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
962 } catch (IOException e) {
963 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
964 }
965 }
966 return null;
967 }
968
969 /**
970 * Creates and returns a deep copy of this object.
971 *
972 *
973 * @return
974 * A deep copy of this object.
975 */
976 @Override
977 @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
978 public Implementation clone() {
979 // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
980 return new Implementation(this);
981 }
982
983 /**
984 * Gets the location URI used for locating instances of this implementation.
985 *
986 * @return The location URI used for locating instances of this implementation or {@code null}, if instances of this
987 * implementation do not need to be located.
988 */
989 public java.net.URI getLocationUri()
990 {
991 try
992 {
993 java.net.URI javaLocation = null;
994
995 if ( this.getLocation() != null )
996 {
997 javaLocation = new java.net.URI( this.getLocation() );
998 }
999
1000 return javaLocation;
1001 }
1002 catch ( java.net.URISyntaxException e )
1003 {
1004 throw new AssertionError( e );
1005 }
1006 }
1007
1008 }