001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
003    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004    // Any modifications to this file will be lost upon recompilation of the source schema. 
005    // Generated on: 2009.09.21 at 10:35:38 PM UTC 
006    //
007    
008    
009    package org.jomc.model;
010    
011    import java.io.ByteArrayInputStream;
012    import java.io.ByteArrayOutputStream;
013    import java.io.IOException;
014    import java.io.InvalidClassException;
015    import java.io.NotSerializableException;
016    import java.io.ObjectInputStream;
017    import java.io.ObjectOutputStream;
018    import java.io.OptionalDataException;
019    import java.io.Serializable;
020    import java.io.StreamCorruptedException;
021    import java.lang.reflect.Array;
022    import java.lang.reflect.InvocationTargetException;
023    import java.math.BigDecimal;
024    import java.math.BigInteger;
025    import java.util.ArrayList;
026    import java.util.Calendar;
027    import java.util.Currency;
028    import java.util.Date;
029    import java.util.Iterator;
030    import java.util.List;
031    import java.util.Locale;
032    import java.util.TimeZone;
033    import java.util.UUID;
034    import javax.annotation.Generated;
035    import javax.xml.bind.JAXBElement;
036    import javax.xml.bind.annotation.XmlAccessType;
037    import javax.xml.bind.annotation.XmlAccessorType;
038    import javax.xml.bind.annotation.XmlAnyElement;
039    import javax.xml.bind.annotation.XmlAttribute;
040    import javax.xml.bind.annotation.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 dependency.
051     * <p>A dependency consists of a name uniquely identifying the dependency in a set
052     * of dependencies and pairs a specification with corresponding implementations
053     * from a set of available implementations. Properties set with a dependency
054     * overwrite properties of the dependencies specification. The {@code bound} flag
055     * indicates if the instance of the dependency is bound to the declaring
056     * implementation. The {@code optional} flag indicates an optional dependency.</p>
057     * 
058     * 
059     * 
060     */
061    @XmlAccessorType(XmlAccessType.FIELD)
062    @XmlType(name = "Dependency", propOrder = {
063        "properties",
064        "any"
065    })
066    @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
067    public class Dependency
068        extends ImplementationReference
069        implements Cloneable
070    {
071    
072        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
073        protected Properties properties;
074        @XmlAnyElement(lax = true)
075        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
076        protected List<Object> any;
077        @XmlAttribute(required = true)
078        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
079        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
080        protected String name;
081        @XmlAttribute
082        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
083        protected Boolean bound;
084        @XmlAttribute
085        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
086        protected Boolean optional;
087    
088        /**
089         * Creates a new {@code Dependency} instance.
090         * 
091         */
092        public Dependency() {
093             // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
094            super();
095        }
096    
097        /**
098         * Creates a new {@code Dependency} instance by deeply copying a given instance.
099         * 
100         * @param o
101         *     The instance to copy or {@code null}.
102         */
103        public Dependency(final Dependency o) {
104             // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
105            super(o);
106            if (o!= null) {
107                {
108                    // CClassInfo: org.jomc.model.Properties
109                    this.properties = ((((Properties) o.getProperties()) == null)?null:((Properties) o.getProperties()).clone());
110                    // 'Any' collection.
111                    copyAny(o.getAny(), getAny());
112                    // CBuiltinLeafInfo: java.lang.String
113                    this.name = ((String) o.getName());
114                    // CBuiltinLeafInfo: java.lang.Boolean
115                    this.bound = ((Boolean) o.isBound());
116                    // CBuiltinLeafInfo: java.lang.Boolean
117                    this.optional = ((Boolean) o.isOptional());
118                }
119            }
120        }
121    
122        /**
123         * Properties of this dependency.
124         * 
125         * @return
126         *     possible object is
127         *     {@link Properties }
128         *     
129         */
130        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
131        public Properties getProperties() {
132            return properties;
133        }
134    
135        /**
136         * Sets the value of the properties property.
137         * 
138         * @param value
139         *     allowed object is
140         *     {@link Properties }
141         *     
142         */
143        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
144        public void setProperties(Properties value) {
145            this.properties = value;
146        }
147    
148        /**
149         * Gets the value of the any property.
150         * 
151         * <p>
152         * This accessor method returns a reference to the live list,
153         * not a snapshot. Therefore any modification you make to the
154         * returned list will be present inside the JAXB object.
155         * This is why there is not a <CODE>set</CODE> method for the any property.
156         * 
157         * <p>
158         * For example, to add a new item, do as follows:
159         * <pre>
160         *    getAny().add(newItem);
161         * </pre>
162         * 
163         * 
164         * <p>
165         * Objects of the following type(s) are allowed in the list
166         * {@link Element }
167         * {@link Object }
168         * 
169         * 
170         */
171        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
172        public List<Object> getAny() {
173            if (any == null) {
174                any = new ArrayList<Object>();
175            }
176            return this.any;
177        }
178    
179        /**
180         * Name of this dependency.
181         * 
182         * @return
183         *     possible object is
184         *     {@link String }
185         *     
186         */
187        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
188        public String getName() {
189            return name;
190        }
191    
192        /**
193         * Sets the value of the name property.
194         * 
195         * @param value
196         *     allowed object is
197         *     {@link String }
198         *     
199         */
200        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
201        public void setName(String value) {
202            this.name = value;
203        }
204    
205        /**
206         * True, if this dependency is bound to its object; false, if not.
207         * 
208         * @return
209         *     possible object is
210         *     {@link Boolean }
211         *     
212         */
213        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
214        public boolean isBound() {
215            if (bound == null) {
216                return true;
217            } else {
218                return bound;
219            }
220        }
221    
222        /**
223         * Sets the value of the bound property.
224         * 
225         * @param value
226         *     allowed object is
227         *     {@link Boolean }
228         *     
229         */
230        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
231        public void setBound(Boolean value) {
232            this.bound = value;
233        }
234    
235        /**
236         * True, if this dependency is optional; false, if not.
237         * 
238         * @return
239         *     possible object is
240         *     {@link Boolean }
241         *     
242         */
243        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
244        public boolean isOptional() {
245            if (optional == null) {
246                return false;
247            } else {
248                return optional;
249            }
250        }
251    
252        /**
253         * Sets the value of the optional property.
254         * 
255         * @param value
256         *     allowed object is
257         *     {@link Boolean }
258         *     
259         */
260        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
261        public void setOptional(Boolean value) {
262            this.optional = value;
263        }
264    
265        /**
266         * Copies all values of property {@code Any} deeply.
267         * 
268         * @param target
269         *     The target to copy {@code source} to.
270         * @param source
271         *     The source to copy from.
272         * @throws NullPointerException
273         *     if {@code source} or {@code target} is {@code null}.
274         */
275        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
276        private static void copyAny(final List<Object> source, final List<Object> target) {
277            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
278            if (!source.isEmpty()) {
279                for (Iterator it = source.iterator(); it.hasNext(); ) {
280                    final Object next = it.next();
281                    if (next instanceof Element) {
282                        // CWildcardTypeInfo: org.w3c.dom.Element
283                        target.add(((Element)((Element) next).cloneNode(true)));
284                        continue;
285                    }
286                    if (next instanceof Object) {
287                        // CBuiltinLeafInfo: java.lang.Object
288                        target.add(copyOfObject(((Object) next)));
289                        continue;
290                    }
291                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
292                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Dependency'."));
293                }
294            }
295        }
296    
297        /**
298         * Creates and returns a deep copy of a given object.
299         * 
300         * @param o
301         *     The instance to copy or {@code null}.
302         * @return
303         *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
304         */
305        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
306        private static Object copyOfObject(final Object o) {
307            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
308            if (o!= null) {
309                if (o.getClass().isPrimitive()) {
310                    return o;
311                }
312                if (o.getClass().isArray()) {
313                    return copyOfArray(o);
314                }
315                if (o instanceof Boolean) {
316                    return o;
317                }
318                if (o instanceof Byte) {
319                    return o;
320                }
321                if (o instanceof Character) {
322                    return o;
323                }
324                if (o instanceof Double) {
325                    return o;
326                }
327                if (o instanceof Enum) {
328                    return o;
329                }
330                if (o instanceof Float) {
331                    return o;
332                }
333                if (o instanceof Integer) {
334                    return o;
335                }
336                if (o instanceof Long) {
337                    return o;
338                }
339                if (o instanceof Short) {
340                    return o;
341                }
342                if (o instanceof String) {
343                    return o;
344                }
345                if (o instanceof BigDecimal) {
346                    return o;
347                }
348                if (o instanceof BigInteger) {
349                    return o;
350                }
351                if (o instanceof UUID) {
352                    return o;
353                }
354                if (o instanceof QName) {
355                    return o;
356                }
357                if (o instanceof Duration) {
358                    return o;
359                }
360                if (o instanceof Currency) {
361                    return o;
362                }
363                if (o instanceof XMLGregorianCalendar) {
364                    return ((XMLGregorianCalendar) o).clone();
365                }
366                if (o instanceof Date) {
367                    return ((Date) o).clone();
368                }
369                if (o instanceof Calendar) {
370                    return ((Calendar) o).clone();
371                }
372                if (o instanceof TimeZone) {
373                    return ((TimeZone) o).clone();
374                }
375                if (o instanceof Locale) {
376                    return ((Locale) o).clone();
377                }
378                if (o instanceof Element) {
379                    return ((Element)((Element) o).cloneNode(true));
380                }
381                if (o instanceof JAXBElement) {
382                    return copyOFJAXBElement(((JAXBElement) o));
383                }
384                try {
385                    return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
386                } catch (NoSuchMethodException e) {
387                    if (o instanceof Serializable) {
388                        return copyOfSerializable(((Serializable) o));
389                    }
390                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
391                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
392                } catch (IllegalAccessException e) {
393                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
394                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
395                } catch (InvocationTargetException e) {
396                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
397                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
398                } catch (SecurityException e) {
399                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
400                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
401                } catch (IllegalArgumentException e) {
402                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
403                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
404                } catch (ExceptionInInitializerError e) {
405                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
406                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
407                }
408            }
409            return null;
410        }
411    
412        /**
413         * Creates and returns a deep copy of a given array.
414         * 
415         * @param array
416         *     The array to copy or {@code null}.
417         * @return
418         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
419         */
420        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
421        private static Object copyOfArray(final Object array) {
422            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
423            if (array!= null) {
424                if (array.getClass() == boolean[].class) {
425                    return copyOf(((boolean[]) array));
426                }
427                if (array.getClass() == byte[].class) {
428                    return copyOf(((byte[]) array));
429                }
430                if (array.getClass() == char[].class) {
431                    return copyOf(((char[]) array));
432                }
433                if (array.getClass() == double[].class) {
434                    return copyOf(((double[]) array));
435                }
436                if (array.getClass() == float[].class) {
437                    return copyOf(((float[]) array));
438                }
439                if (array.getClass() == int[].class) {
440                    return copyOf(((int[]) array));
441                }
442                if (array.getClass() == long[].class) {
443                    return copyOf(((long[]) array));
444                }
445                if (array.getClass() == short[].class) {
446                    return copyOf(((short[]) array));
447                }
448                final int len = Array.getLength(array);
449                final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
450                for (int i = (len- 1); (i >= 0); i--) {
451                    Array.set(copy, i, copyOfObject(Array.get(array, i)));
452                }
453                return copy;
454            }
455            return null;
456        }
457    
458        /**
459         * Creates and returns a deep copy of a given array.
460         * 
461         * @param array
462         *     The array to copy or {@code null}.
463         * @return
464         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
465         */
466        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
467        private static boolean[] copyOf(final boolean[] array) {
468            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
469            if (array!= null) {
470                final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
471                System.arraycopy(array, 0, copy, 0, array.length);
472                return copy;
473            }
474            return null;
475        }
476    
477        /**
478         * Creates and returns a deep copy of a given array.
479         * 
480         * @param array
481         *     The array to copy or {@code null}.
482         * @return
483         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
484         */
485        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
486        private static byte[] copyOf(final byte[] array) {
487            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
488            if (array!= null) {
489                final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
490                System.arraycopy(array, 0, copy, 0, array.length);
491                return copy;
492            }
493            return null;
494        }
495    
496        /**
497         * Creates and returns a deep copy of a given array.
498         * 
499         * @param array
500         *     The array to copy or {@code null}.
501         * @return
502         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
503         */
504        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
505        private static char[] copyOf(final char[] array) {
506            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
507            if (array!= null) {
508                final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
509                System.arraycopy(array, 0, copy, 0, array.length);
510                return copy;
511            }
512            return null;
513        }
514    
515        /**
516         * Creates and returns a deep copy of a given array.
517         * 
518         * @param array
519         *     The array to copy or {@code null}.
520         * @return
521         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
522         */
523        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
524        private static double[] copyOf(final double[] array) {
525            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
526            if (array!= null) {
527                final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
528                System.arraycopy(array, 0, copy, 0, array.length);
529                return copy;
530            }
531            return null;
532        }
533    
534        /**
535         * Creates and returns a deep copy of a given array.
536         * 
537         * @param array
538         *     The array to copy or {@code null}.
539         * @return
540         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
541         */
542        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
543        private static float[] copyOf(final float[] array) {
544            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
545            if (array!= null) {
546                final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
547                System.arraycopy(array, 0, copy, 0, array.length);
548                return copy;
549            }
550            return null;
551        }
552    
553        /**
554         * Creates and returns a deep copy of a given array.
555         * 
556         * @param array
557         *     The array to copy or {@code null}.
558         * @return
559         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
560         */
561        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
562        private static int[] copyOf(final int[] array) {
563            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
564            if (array!= null) {
565                final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
566                System.arraycopy(array, 0, copy, 0, array.length);
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-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
581        private static long[] copyOf(final long[] array) {
582            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
583            if (array!= null) {
584                final long[] copy = ((long[]) 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-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
600        private static short[] copyOf(final short[] array) {
601            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
602            if (array!= null) {
603                final short[] copy = ((short[]) 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 {@code JAXBElement} instance.
612         * 
613         * @param element
614         *     The instance to copy or {@code null}.
615         * @return
616         *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
617         */
618        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
619        private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
620            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
621            if (element!= null) {
622                final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
623                copy.setNil(element.isNil());
624                copy.setValue(copyOfObject(copy.getValue()));
625                return copy;
626            }
627            return null;
628        }
629    
630        /**
631         * Creates and returns a deep copy of a given {@code Serializable}.
632         * 
633         * @param serializable
634         *     The instance to copy or {@code null}.
635         * @return
636         *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
637         */
638        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
639        private static Serializable copyOfSerializable(final Serializable serializable) {
640            // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
641            if (serializable!= null) {
642                try {
643                    final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
644                    final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
645                    out.writeObject(serializable);
646                    out.close();
647                    final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
648                    final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
649                    final Serializable copy = ((Serializable) in.readObject());
650                    in.close();
651                    return copy;
652                } catch (SecurityException e) {
653                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
654                } catch (ClassNotFoundException e) {
655                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
656                } catch (InvalidClassException e) {
657                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
658                } catch (NotSerializableException e) {
659                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
660                } catch (StreamCorruptedException e) {
661                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
662                } catch (OptionalDataException e) {
663                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
664                } catch (IOException e) {
665                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
666                }
667            }
668            return null;
669        }
670    
671        /**
672         * Creates and returns a deep copy of this object.
673         * 
674         * 
675         * @return
676         *     A deep copy of this object.
677         */
678        @Override
679        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-09-21T10:35:38+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
680        public Dependency clone() {
681             // CC-XJC Version 1.0 Build 2009-09-18T15:48:40+0000
682            return new Dependency(this);
683        }
684    
685    }