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