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.11.18 at 06:28:36 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.XmlType;
041    import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
042    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
043    import javax.xml.datatype.Duration;
044    import javax.xml.datatype.XMLGregorianCalendar;
045    import javax.xml.namespace.QName;
046    import org.w3c.dom.Element;
047    
048    
049    /**
050     * Model of a specification.
051     * <p>A specification consists of the properties {@code identifier}, {@code class},
052     * {@code vendor}, {@code description} and {@code version}. Property
053     * {@code identifier} holds an identifier uniquely identifying the specification in
054     * a set of specifications. Property {@code class} holds the name of the class
055     * providing the programming interface of the specification. Property
056     * {@code vendor} holds vendor information for the vendor providing the
057     * specification. Property {@code description} holds a textual description and
058     * property {@code version} holds a textual version of the specification.
059     * 
060     * <p>Property {@code multiplicity} specifies the number of implementations allowed
061     * to exist among a set of modules. A specification with {@link Multiplicity#ONE}
062     * specifies that no more than one implementation of the specification is allowed
063     * to exist among a set of modules (including none). A specification with
064     * {@link Multiplicity#MANY} specifies that multiple implementations of the
065     * specification are allowed to exist among a set of modules (including none).</p>
066     * 
067     * <p>Property {@code scope} specifies the scope instances of implementations apply
068     * to. In {@code Singleton} scope, objects are bound to a system's single instance
069     * store - an object is only created if not already available in that single
070     * instance store.</p>
071     * 
072     * 
073     * 
074     */
075    @XmlAccessorType(XmlAccessType.FIELD)
076    @XmlType(name = "Specification", propOrder = {
077        "properties",
078        "any"
079    })
080    @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
081    public class Specification
082        extends ModelObject
083        implements Cloneable
084    {
085    
086        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
087        protected Properties properties;
088        @XmlAnyElement(lax = true)
089        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
090        protected List<Object> any;
091        @XmlAttribute(required = true)
092        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
093        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
094        protected String identifier;
095        @XmlAttribute(name = "class", required = true)
096        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
097        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
098        protected String clazz;
099        @XmlAttribute
100        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
101        protected String vendor;
102        @XmlAttribute
103        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
104        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
105        protected String version;
106        @XmlAttribute
107        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
108        protected Multiplicity multiplicity;
109        @XmlAttribute
110        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
111        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
112        protected String scope;
113    
114        /**
115         * Creates a new {@code Specification} instance.
116         * 
117         */
118        public Specification() {
119            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
120            super();
121        }
122    
123        /**
124         * Creates a new {@code Specification} instance by deeply copying a given {@code Specification} instance.
125         * 
126         * 
127         * @param o
128         *     The instance to copy.
129         * @throws NullPointerException
130         *     if {@code o} is {@code null}.
131         */
132        public Specification(final Specification o) {
133            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
134            super(o);
135            if (o == null) {
136                throw new NullPointerException("Cannot create a copy of 'Specification' from 'null'.");
137            }
138            // CClassInfo: org.jomc.model.Properties
139            this.properties = ((o.getProperties() == null)?null:o.getProperties().clone());
140            // 'Any' collection.
141            copyAny(o.getAny(), getAny());
142            // CBuiltinLeafInfo: java.lang.String
143            this.identifier = o.getIdentifier();
144            // CBuiltinLeafInfo: java.lang.String
145            this.clazz = o.getClazz();
146            // CBuiltinLeafInfo: java.lang.String
147            this.vendor = o.getVendor();
148            // CBuiltinLeafInfo: java.lang.String
149            this.version = o.getVersion();
150            // CEnumLeafInfo: org.jomc.model.Multiplicity
151            this.multiplicity = o.getMultiplicity();
152            // CBuiltinLeafInfo: java.lang.String
153            this.scope = o.getScope();
154        }
155    
156        /**
157         * Properties of this specification or {@code null}.
158         * 
159         * @return
160         *     possible object is
161         *     {@link Properties }
162         *     
163         */
164        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
165        public Properties getProperties() {
166            return properties;
167        }
168    
169        /**
170         * Sets the value of the properties property.
171         * 
172         * @param value
173         *     allowed object is
174         *     {@link Properties }
175         *     
176         */
177        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
178        public void setProperties(Properties value) {
179            this.properties = value;
180        }
181    
182        /**
183         * Gets the value of the any property.
184         * 
185         * <p>
186         * This accessor method returns a reference to the live list,
187         * not a snapshot. Therefore any modification you make to the
188         * returned list will be present inside the JAXB object.
189         * This is why there is not a <CODE>set</CODE> method for the any property.
190         * 
191         * <p>
192         * For example, to add a new item, do as follows:
193         * <pre>
194         *    getAny().add(newItem);
195         * </pre>
196         * 
197         * 
198         * <p>
199         * Objects of the following type(s) are allowed in the list
200         * {@link Element }
201         * {@link Object }
202         * 
203         * 
204         */
205        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
206        public List<Object> getAny() {
207            if (any == null) {
208                any = new ArrayList<Object>();
209            }
210            return this.any;
211        }
212    
213        /**
214         * The identifier of this specification.
215         * 
216         * @return
217         *     possible object is
218         *     {@link String }
219         *     
220         */
221        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
222        public String getIdentifier() {
223            return identifier;
224        }
225    
226        /**
227         * Sets the value of the identifier property.
228         * 
229         * @param value
230         *     allowed object is
231         *     {@link String }
232         *     
233         */
234        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
235        public void setIdentifier(String value) {
236            this.identifier = value;
237        }
238    
239        /**
240         * The name of the class providing the programming interface of this specification.
241         * 
242         * @return
243         *     possible object is
244         *     {@link String }
245         *     
246         */
247        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
248        public String getClazz() {
249            return clazz;
250        }
251    
252        /**
253         * Sets the value of the clazz property.
254         * 
255         * @param value
256         *     allowed object is
257         *     {@link String }
258         *     
259         */
260        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
261        public void setClazz(String value) {
262            this.clazz = value;
263        }
264    
265        /**
266         * The vendor of this specification or {@code null}.
267         * 
268         * @return
269         *     possible object is
270         *     {@link String }
271         *     
272         */
273        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
274        public String getVendor() {
275            return vendor;
276        }
277    
278        /**
279         * Sets the value of the vendor property.
280         * 
281         * @param value
282         *     allowed object is
283         *     {@link String }
284         *     
285         */
286        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
287        public void setVendor(String value) {
288            this.vendor = value;
289        }
290    
291        /**
292         * The version of this specification or {@code null}.
293         * 
294         * @return
295         *     possible object is
296         *     {@link String }
297         *     
298         */
299        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
300        public String getVersion() {
301            return version;
302        }
303    
304        /**
305         * Sets the value of the version property.
306         * 
307         * @param value
308         *     allowed object is
309         *     {@link String }
310         *     
311         */
312        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
313        public void setVersion(String value) {
314            this.version = value;
315        }
316    
317        /**
318         * 
319         * The implementation multiplicity of this specification. A multiplicity equal to
320         * {@link Multiplicity#ONE} specifies that no more than one implementation of the
321         * specification is allowed to exist among a set of modules (including none).
322         * A multiplicity equal to {@link Multiplicity#MANY} specifies that many
323         * implementations are allowed to exist among a set of modules (including none).
324         * 
325         * @return
326         *     possible object is
327         *     {@link Multiplicity }
328         *     
329         */
330        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
331        public Multiplicity getMultiplicity() {
332            if (multiplicity == null) {
333                return Multiplicity.MANY;
334            } else {
335                return multiplicity;
336            }
337        }
338    
339        /**
340         * Sets the value of the multiplicity property.
341         * 
342         * @param value
343         *     allowed object is
344         *     {@link Multiplicity }
345         *     
346         */
347        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
348        public void setMultiplicity(Multiplicity value) {
349            this.multiplicity = value;
350        }
351    
352        /**
353         * Scope instances of implementations apply to or {@code null} if instances of implementations are not bound to any scope (multiton).
354         * 
355         * @return
356         *     possible object is
357         *     {@link String }
358         *     
359         */
360        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
361        public String getScope() {
362            return scope;
363        }
364    
365        /**
366         * Sets the value of the scope property.
367         * 
368         * @param value
369         *     allowed object is
370         *     {@link String }
371         *     
372         */
373        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
374        public void setScope(String value) {
375            this.scope = value;
376        }
377    
378        /**
379         * Copies all values of property {@code Any} deeply.
380         * 
381         * @param target
382         *     The target to copy {@code source} to.
383         * @param source
384         *     The source to copy from.
385         * @throws NullPointerException
386         *     if {@code source} or {@code target} is {@code null}.
387         */
388        @SuppressWarnings("unchecked")
389        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
390        private static void copyAny(final List<Object> source, final List<Object> target) {
391            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
392            if (!source.isEmpty()) {
393                for (Iterator it = source.iterator(); it.hasNext(); ) {
394                    final Object next = it.next();
395                    if (next instanceof Element) {
396                        // CWildcardTypeInfo: org.w3c.dom.Element
397                        target.add(((Element)((Element) next).cloneNode(true)));
398                        continue;
399                    }
400                    if (next instanceof Object) {
401                        // CBuiltinLeafInfo: java.lang.Object
402                        target.add(copyOfObject(((Object) next)));
403                        continue;
404                    }
405                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
406                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Specification'."));
407                }
408            }
409        }
410    
411        /**
412         * Creates and returns a deep copy of a given object.
413         * 
414         * @param o
415         *     The instance to copy or {@code null}.
416         * @return
417         *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
418         */
419        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
420        private static Object copyOfObject(final Object o) {
421            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
422            if (o!= null) {
423                if (o.getClass().isPrimitive()) {
424                    return o;
425                }
426                if (o.getClass().isArray()) {
427                    return copyOfArray(o);
428                }
429                if (o instanceof Boolean) {
430                    return o;
431                }
432                if (o instanceof Byte) {
433                    return o;
434                }
435                if (o instanceof Character) {
436                    return o;
437                }
438                if (o instanceof Double) {
439                    return o;
440                }
441                if (o instanceof Enum) {
442                    return o;
443                }
444                if (o instanceof Float) {
445                    return o;
446                }
447                if (o instanceof Integer) {
448                    return o;
449                }
450                if (o instanceof Long) {
451                    return o;
452                }
453                if (o instanceof Short) {
454                    return o;
455                }
456                if (o instanceof String) {
457                    return o;
458                }
459                if (o instanceof BigDecimal) {
460                    return o;
461                }
462                if (o instanceof BigInteger) {
463                    return o;
464                }
465                if (o instanceof UUID) {
466                    return o;
467                }
468                if (o instanceof QName) {
469                    return o;
470                }
471                if (o instanceof Duration) {
472                    return o;
473                }
474                if (o instanceof Currency) {
475                    return o;
476                }
477                if (o instanceof XMLGregorianCalendar) {
478                    return ((XMLGregorianCalendar) o).clone();
479                }
480                if (o instanceof Date) {
481                    return ((Date) o).clone();
482                }
483                if (o instanceof Calendar) {
484                    return ((Calendar) o).clone();
485                }
486                if (o instanceof TimeZone) {
487                    return ((TimeZone) o).clone();
488                }
489                if (o instanceof Locale) {
490                    return ((Locale) o).clone();
491                }
492                if (o instanceof Element) {
493                    return ((Element)((Element) o).cloneNode(true));
494                }
495                if (o instanceof JAXBElement) {
496                    return copyOFJAXBElement(((JAXBElement) o));
497                }
498                try {
499                    return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
500                } catch (NoSuchMethodException e) {
501                    if (o instanceof Serializable) {
502                        return copyOfSerializable(((Serializable) o));
503                    }
504                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
505                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
506                } catch (IllegalAccessException e) {
507                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
508                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
509                } catch (InvocationTargetException e) {
510                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
511                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
512                } catch (SecurityException e) {
513                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
514                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
515                } catch (IllegalArgumentException e) {
516                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
517                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
518                } catch (ExceptionInInitializerError e) {
519                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
520                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
521                }
522            }
523            return null;
524        }
525    
526        /**
527         * Creates and returns a deep copy of a given array.
528         * 
529         * @param array
530         *     The array to copy or {@code null}.
531         * @return
532         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
533         */
534        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
535        private static Object copyOfArray(final Object array) {
536            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
537            if (array!= null) {
538                if (array.getClass() == boolean[].class) {
539                    return copyOf(((boolean[]) array));
540                }
541                if (array.getClass() == byte[].class) {
542                    return copyOf(((byte[]) array));
543                }
544                if (array.getClass() == char[].class) {
545                    return copyOf(((char[]) array));
546                }
547                if (array.getClass() == double[].class) {
548                    return copyOf(((double[]) array));
549                }
550                if (array.getClass() == float[].class) {
551                    return copyOf(((float[]) array));
552                }
553                if (array.getClass() == int[].class) {
554                    return copyOf(((int[]) array));
555                }
556                if (array.getClass() == long[].class) {
557                    return copyOf(((long[]) array));
558                }
559                if (array.getClass() == short[].class) {
560                    return copyOf(((short[]) array));
561                }
562                final int len = Array.getLength(array);
563                final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
564                for (int i = (len- 1); (i >= 0); i--) {
565                    Array.set(copy, i, copyOfObject(Array.get(array, i)));
566                }
567                return copy;
568            }
569            return null;
570        }
571    
572        /**
573         * Creates and returns a deep copy of a given array.
574         * 
575         * @param array
576         *     The array to copy or {@code null}.
577         * @return
578         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
579         */
580        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
581        private static boolean[] copyOf(final boolean[] array) {
582            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
583            if (array!= null) {
584                final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
585                System.arraycopy(array, 0, copy, 0, array.length);
586                return copy;
587            }
588            return null;
589        }
590    
591        /**
592         * Creates and returns a deep copy of a given array.
593         * 
594         * @param array
595         *     The array to copy or {@code null}.
596         * @return
597         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
598         */
599        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
600        private static byte[] copyOf(final byte[] array) {
601            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
602            if (array!= null) {
603                final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
604                System.arraycopy(array, 0, copy, 0, array.length);
605                return copy;
606            }
607            return null;
608        }
609    
610        /**
611         * Creates and returns a deep copy of a given array.
612         * 
613         * @param array
614         *     The array to copy or {@code null}.
615         * @return
616         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
617         */
618        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
619        private static char[] copyOf(final char[] array) {
620            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
621            if (array!= null) {
622                final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
623                System.arraycopy(array, 0, copy, 0, array.length);
624                return copy;
625            }
626            return null;
627        }
628    
629        /**
630         * Creates and returns a deep copy of a given array.
631         * 
632         * @param array
633         *     The array to copy or {@code null}.
634         * @return
635         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
636         */
637        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
638        private static double[] copyOf(final double[] array) {
639            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
640            if (array!= null) {
641                final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
642                System.arraycopy(array, 0, copy, 0, array.length);
643                return copy;
644            }
645            return null;
646        }
647    
648        /**
649         * Creates and returns a deep copy of a given array.
650         * 
651         * @param array
652         *     The array to copy or {@code null}.
653         * @return
654         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
655         */
656        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
657        private static float[] copyOf(final float[] array) {
658            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
659            if (array!= null) {
660                final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
661                System.arraycopy(array, 0, copy, 0, array.length);
662                return copy;
663            }
664            return null;
665        }
666    
667        /**
668         * Creates and returns a deep copy of a given array.
669         * 
670         * @param array
671         *     The array to copy or {@code null}.
672         * @return
673         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
674         */
675        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
676        private static int[] copyOf(final int[] array) {
677            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
678            if (array!= null) {
679                final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
680                System.arraycopy(array, 0, copy, 0, array.length);
681                return copy;
682            }
683            return null;
684        }
685    
686        /**
687         * Creates and returns a deep copy of a given array.
688         * 
689         * @param array
690         *     The array to copy or {@code null}.
691         * @return
692         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
693         */
694        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
695        private static long[] copyOf(final long[] array) {
696            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
697            if (array!= null) {
698                final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
699                System.arraycopy(array, 0, copy, 0, array.length);
700                return copy;
701            }
702            return null;
703        }
704    
705        /**
706         * Creates and returns a deep copy of a given array.
707         * 
708         * @param array
709         *     The array to copy or {@code null}.
710         * @return
711         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
712         */
713        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
714        private static short[] copyOf(final short[] array) {
715            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
716            if (array!= null) {
717                final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
718                System.arraycopy(array, 0, copy, 0, array.length);
719                return copy;
720            }
721            return null;
722        }
723    
724        /**
725         * Creates and returns a deep copy of a given {@code JAXBElement} instance.
726         * 
727         * @param element
728         *     The instance to copy or {@code null}.
729         * @return
730         *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
731         */
732        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
733        private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
734            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
735            if (element!= null) {
736                final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
737                copy.setNil(element.isNil());
738                copy.setValue(copyOfObject(copy.getValue()));
739                return copy;
740            }
741            return null;
742        }
743    
744        /**
745         * Creates and returns a deep copy of a given {@code Serializable}.
746         * 
747         * @param serializable
748         *     The instance to copy or {@code null}.
749         * @return
750         *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
751         */
752        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
753        private static Serializable copyOfSerializable(final Serializable serializable) {
754            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
755            if (serializable!= null) {
756                try {
757                    final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
758                    final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
759                    out.writeObject(serializable);
760                    out.close();
761                    final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
762                    final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
763                    final Serializable copy = ((Serializable) in.readObject());
764                    in.close();
765                    return copy;
766                } catch (SecurityException e) {
767                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
768                } catch (ClassNotFoundException e) {
769                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
770                } catch (InvalidClassException e) {
771                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
772                } catch (NotSerializableException e) {
773                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
774                } catch (StreamCorruptedException e) {
775                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
776                } catch (OptionalDataException e) {
777                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
778                } catch (IOException e) {
779                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
780                }
781            }
782            return null;
783        }
784    
785        /**
786         * Creates and returns a deep copy of this object.
787         * 
788         * 
789         * @return
790         *     A deep copy of this object.
791         */
792        @Override
793        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-11-18T06:28:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
794        public Specification clone() {
795            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
796            return new Specification(this);
797        }
798    
799    }