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