EMMA Coverage Report (generated Tue Jun 29 17:42:06 CEST 2010)
[all classes][org.jomc.sdk.model]

COVERAGE SUMMARY FOR SOURCE FILE [SchemaType.java]

nameclass, %method, %block, %line, %
SchemaType.java100% (1/1)36%  (8/22)8%   (65/864)10%  (19/194)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SchemaType100% (1/1)36%  (8/22)8%   (65/864)10%  (19/194)
copyOFJAXBElement (JAXBElement): JAXBElement 0%   (0/1)0%   (0/27)0%   (0/6)
copyOf (boolean []): boolean [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (byte []): byte [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (char []): char [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (double []): double [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (float []): float [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (int []): int [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (long []): long [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOf (short []): short [] 0%   (0/1)0%   (0/22)0%   (0/5)
copyOfArray (Object): Object 0%   (0/1)0%   (0/102)0%   (0/23)
copyOfObject (Object): Object 0%   (0/1)0%   (0/274)0%   (0/67)
copyOfSerializable (Serializable): Serializable 0%   (0/1)0%   (0/163)0%   (0/25)
setPublicId (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setSystemId (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
copyAny (List, List): void 100% (1/1)8%   (4/48)18%  (2/11)
SchemaType (SchemaType): void 100% (1/1)85%  (28/33)89%  (8/9)
SchemaType (): void 100% (1/1)100% (8/8)100% (3/3)
clone (): SchemaType 100% (1/1)100% (5/5)100% (1/1)
getAny (): List 100% (1/1)100% (11/11)100% (3/3)
getOtherAttributes (): Map 100% (1/1)100% (3/3)100% (1/1)
getPublicId (): String 100% (1/1)100% (3/3)100% (1/1)
getSystemId (): String 100% (1/1)100% (3/3)100% (1/1)

1//
2// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
3// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4// Any modifications to this file will be lost upon recompilation of the source schema. 
5// Generated on: 2010.06.29 at 05:36:20 PM CEST 
6//
7 
8 
9package org.jomc.sdk.model;
10 
11import java.io.ByteArrayInputStream;
12import java.io.ByteArrayOutputStream;
13import java.io.IOException;
14import java.io.InvalidClassException;
15import java.io.NotSerializableException;
16import java.io.ObjectInputStream;
17import java.io.ObjectOutputStream;
18import java.io.OptionalDataException;
19import java.io.Serializable;
20import java.io.StreamCorruptedException;
21import java.lang.reflect.Array;
22import java.lang.reflect.InvocationTargetException;
23import java.math.BigDecimal;
24import java.math.BigInteger;
25import java.util.ArrayList;
26import java.util.Calendar;
27import java.util.Currency;
28import java.util.Date;
29import java.util.HashMap;
30import java.util.Iterator;
31import java.util.List;
32import java.util.Locale;
33import java.util.Map;
34import java.util.TimeZone;
35import java.util.UUID;
36import javax.annotation.Generated;
37import javax.xml.bind.JAXBElement;
38import javax.xml.bind.annotation.XmlAccessType;
39import javax.xml.bind.annotation.XmlAccessorType;
40import javax.xml.bind.annotation.XmlAnyAttribute;
41import javax.xml.bind.annotation.XmlAnyElement;
42import javax.xml.bind.annotation.XmlAttribute;
43import javax.xml.bind.annotation.XmlType;
44import javax.xml.datatype.Duration;
45import javax.xml.datatype.XMLGregorianCalendar;
46import javax.xml.namespace.QName;
47import org.w3c.dom.Element;
48 
49 
50/**
51 * 
52 * Model of a schema.
53 * 
54 * The 'SchemaType' type defines attributes 'system-id' and 'public-id'. Attribute 'system-id' holds the system identifier
55 * of the schema. Attribute 'public-id' holds the public identifier of the schema.
56 *       
57 * 
58 * <p>Java class for SchemaType complex type.
59 * 
60 * <p>The following schema fragment specifies the expected content contained within this class.
61 * 
62 * <pre>
63 * &lt;complexType name="SchemaType">
64 *   &lt;complexContent>
65 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
66 *       &lt;sequence>
67 *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
68 *       &lt;/sequence>
69 *       &lt;attribute name="system-id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
70 *       &lt;attribute name="public-id" type="{http://www.w3.org/2001/XMLSchema}string" />
71 *       &lt;anyAttribute processContents='lax'/>
72 *     &lt;/restriction>
73 *   &lt;/complexContent>
74 * &lt;/complexType>
75 * </pre>
76 * 
77 * 
78 */
79@XmlAccessorType(XmlAccessType.FIELD)
80@XmlType(name = "SchemaType", propOrder = {
81    "any"
82})
83@Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
84public class SchemaType implements Cloneable
85{
86 
87    @XmlAnyElement(lax = true)
88    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
89    protected List<Object> any;
90    @XmlAttribute(name = "system-id", required = true)
91    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
92    protected String systemId;
93    @XmlAttribute(name = "public-id")
94    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
95    protected String publicId;
96    @XmlAnyAttribute
97    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
98    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
99 
100    /**
101     * Creates a new {@code SchemaType} instance.
102     * 
103     */
104    public SchemaType() {
105        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
106        super();
107    }
108 
109    /**
110     * Creates a new {@code SchemaType} instance by deeply copying a given {@code SchemaType} instance.
111     * 
112     * 
113     * @param o
114     *     The instance to copy.
115     * @throws NullPointerException
116     *     if {@code o} is {@code null}.
117     */
118    public SchemaType(final SchemaType o) {
119        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
120        super();
121        if (o == null) {
122            throw new NullPointerException("Cannot create a copy of 'SchemaType' from 'null'.");
123        }
124        // 'Any' collection.
125        copyAny(o.getAny(), getAny());
126        // CBuiltinLeafInfo: java.lang.String
127        this.systemId = o.getSystemId();
128        // CBuiltinLeafInfo: java.lang.String
129        this.publicId = o.getPublicId();
130        // Other attributes.
131        this.otherAttributes.putAll(o.otherAttributes);
132    }
133 
134    /**
135     * Gets the value of the any property.
136     * 
137     * <p>
138     * This accessor method returns a reference to the live list,
139     * not a snapshot. Therefore any modification you make to the
140     * returned list will be present inside the JAXB object.
141     * This is why there is not a <CODE>set</CODE> method for the any property.
142     * 
143     * <p>
144     * For example, to add a new item, do as follows:
145     * <pre>
146     *    getAny().add(newItem);
147     * </pre>
148     * 
149     * 
150     * <p>
151     * Objects of the following type(s) are allowed in the list
152     * {@link Element }
153     * {@link Object }
154     * 
155     * 
156     */
157    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
158    public List<Object> getAny() {
159        if (any == null) {
160            any = new ArrayList<Object>();
161        }
162        return this.any;
163    }
164 
165    /**
166     * The system identifier of the schema.
167     * 
168     * @return
169     *     possible object is
170     *     {@link String }
171     *     
172     */
173    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
174    public String getSystemId() {
175        return systemId;
176    }
177 
178    /**
179     * Sets the value of the systemId property.
180     * 
181     * @param value
182     *     allowed object is
183     *     {@link String }
184     *     
185     */
186    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
187    public void setSystemId(String value) {
188        this.systemId = value;
189    }
190 
191    /**
192     * The public identifier of the schema or {@code null}.
193     * 
194     * @return
195     *     possible object is
196     *     {@link String }
197     *     
198     */
199    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
200    public String getPublicId() {
201        return publicId;
202    }
203 
204    /**
205     * Sets the value of the publicId property.
206     * 
207     * @param value
208     *     allowed object is
209     *     {@link String }
210     *     
211     */
212    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
213    public void setPublicId(String value) {
214        this.publicId = value;
215    }
216 
217    /**
218     * Gets a map that contains attributes that aren't bound to any typed property on this class.
219     * 
220     * <p>
221     * the map is keyed by the name of the attribute and 
222     * the value is the string value of the attribute.
223     * 
224     * the map returned by this method is live, and you can add new attribute
225     * by updating the map directly. Because of this design, there's no setter.
226     * 
227     * 
228     * @return
229     *     always non-null
230     */
231    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
232    public Map<QName, String> getOtherAttributes() {
233        return otherAttributes;
234    }
235 
236    /**
237     * Copies all values of property {@code Any} deeply.
238     * 
239     * @param target
240     *     The target to copy {@code source} to.
241     * @param source
242     *     The source to copy from.
243     * @throws NullPointerException
244     *     if {@code source} or {@code target} is {@code null}.
245     */
246    @SuppressWarnings("unchecked")
247    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
248    private static void copyAny(final List<Object> source, final List<Object> target) {
249        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
250        if (!source.isEmpty()) {
251            for (Iterator it = source.iterator(); it.hasNext(); ) {
252                final Object next = it.next();
253                if (next instanceof Element) {
254                    // CWildcardTypeInfo: org.w3c.dom.Element
255                    target.add(((Element)((Element) next).cloneNode(true)));
256                    continue;
257                }
258                if (next instanceof Object) {
259                    // CBuiltinLeafInfo: java.lang.Object
260                    target.add(copyOfObject(((Object) next)));
261                    continue;
262                }
263                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
264                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.sdk.model.SchemaType'."));
265            }
266        }
267    }
268 
269    /**
270     * Creates and returns a deep copy of a given object.
271     * 
272     * @param o
273     *     The instance to copy or {@code null}.
274     * @return
275     *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
276     */
277    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
278    private static Object copyOfObject(final Object o) {
279        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
280        if (o!= null) {
281            if (o.getClass().isPrimitive()) {
282                return o;
283            }
284            if (o.getClass().isArray()) {
285                return copyOfArray(o);
286            }
287            if (o instanceof Boolean) {
288                return o;
289            }
290            if (o instanceof Byte) {
291                return o;
292            }
293            if (o instanceof Character) {
294                return o;
295            }
296            if (o instanceof Double) {
297                return o;
298            }
299            if (o instanceof Enum) {
300                return o;
301            }
302            if (o instanceof Float) {
303                return o;
304            }
305            if (o instanceof Integer) {
306                return o;
307            }
308            if (o instanceof Long) {
309                return o;
310            }
311            if (o instanceof Short) {
312                return o;
313            }
314            if (o instanceof String) {
315                return o;
316            }
317            if (o instanceof BigDecimal) {
318                return o;
319            }
320            if (o instanceof BigInteger) {
321                return o;
322            }
323            if (o instanceof UUID) {
324                return o;
325            }
326            if (o instanceof QName) {
327                return o;
328            }
329            if (o instanceof Duration) {
330                return o;
331            }
332            if (o instanceof Currency) {
333                return o;
334            }
335            if (o instanceof XMLGregorianCalendar) {
336                return ((XMLGregorianCalendar) o).clone();
337            }
338            if (o instanceof Date) {
339                return ((Date) o).clone();
340            }
341            if (o instanceof Calendar) {
342                return ((Calendar) o).clone();
343            }
344            if (o instanceof TimeZone) {
345                return ((TimeZone) o).clone();
346            }
347            if (o instanceof Locale) {
348                return ((Locale) o).clone();
349            }
350            if (o instanceof Element) {
351                return ((Element)((Element) o).cloneNode(true));
352            }
353            if (o instanceof JAXBElement) {
354                return copyOFJAXBElement(((JAXBElement) o));
355            }
356            try {
357                return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
358            } catch (NoSuchMethodException e) {
359                if (o instanceof Serializable) {
360                    return copyOfSerializable(((Serializable) o));
361                }
362                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
363                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
364            } catch (IllegalAccessException e) {
365                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
366                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
367            } catch (InvocationTargetException e) {
368                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
369                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
370            } catch (SecurityException e) {
371                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
372                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
373            } catch (IllegalArgumentException e) {
374                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
375                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
376            } catch (ExceptionInInitializerError e) {
377                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
378                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
379            }
380        }
381        return null;
382    }
383 
384    /**
385     * Creates and returns a deep copy of a given array.
386     * 
387     * @param array
388     *     The array to copy or {@code null}.
389     * @return
390     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
391     */
392    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
393    private static Object copyOfArray(final Object array) {
394        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
395        if (array!= null) {
396            if (array.getClass() == boolean[].class) {
397                return copyOf(((boolean[]) array));
398            }
399            if (array.getClass() == byte[].class) {
400                return copyOf(((byte[]) array));
401            }
402            if (array.getClass() == char[].class) {
403                return copyOf(((char[]) array));
404            }
405            if (array.getClass() == double[].class) {
406                return copyOf(((double[]) array));
407            }
408            if (array.getClass() == float[].class) {
409                return copyOf(((float[]) array));
410            }
411            if (array.getClass() == int[].class) {
412                return copyOf(((int[]) array));
413            }
414            if (array.getClass() == long[].class) {
415                return copyOf(((long[]) array));
416            }
417            if (array.getClass() == short[].class) {
418                return copyOf(((short[]) array));
419            }
420            final int len = Array.getLength(array);
421            final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
422            for (int i = (len- 1); (i >= 0); i--) {
423                Array.set(copy, i, copyOfObject(Array.get(array, i)));
424            }
425            return copy;
426        }
427        return null;
428    }
429 
430    /**
431     * Creates and returns a deep copy of a given array.
432     * 
433     * @param array
434     *     The array to copy or {@code null}.
435     * @return
436     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
437     */
438    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
439    private static boolean[] copyOf(final boolean[] array) {
440        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
441        if (array!= null) {
442            final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
443            System.arraycopy(array, 0, copy, 0, array.length);
444            return copy;
445        }
446        return null;
447    }
448 
449    /**
450     * Creates and returns a deep copy of a given array.
451     * 
452     * @param array
453     *     The array to copy or {@code null}.
454     * @return
455     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
456     */
457    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
458    private static byte[] copyOf(final byte[] array) {
459        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
460        if (array!= null) {
461            final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
462            System.arraycopy(array, 0, copy, 0, array.length);
463            return copy;
464        }
465        return null;
466    }
467 
468    /**
469     * Creates and returns a deep copy of a given array.
470     * 
471     * @param array
472     *     The array to copy or {@code null}.
473     * @return
474     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
475     */
476    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
477    private static char[] copyOf(final char[] array) {
478        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
479        if (array!= null) {
480            final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
481            System.arraycopy(array, 0, copy, 0, array.length);
482            return copy;
483        }
484        return null;
485    }
486 
487    /**
488     * Creates and returns a deep copy of a given array.
489     * 
490     * @param array
491     *     The array to copy or {@code null}.
492     * @return
493     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
494     */
495    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
496    private static double[] copyOf(final double[] array) {
497        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
498        if (array!= null) {
499            final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
500            System.arraycopy(array, 0, copy, 0, array.length);
501            return copy;
502        }
503        return null;
504    }
505 
506    /**
507     * Creates and returns a deep copy of a given array.
508     * 
509     * @param array
510     *     The array to copy or {@code null}.
511     * @return
512     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
513     */
514    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
515    private static float[] copyOf(final float[] array) {
516        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
517        if (array!= null) {
518            final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
519            System.arraycopy(array, 0, copy, 0, array.length);
520            return copy;
521        }
522        return null;
523    }
524 
525    /**
526     * Creates and returns a deep copy of a given array.
527     * 
528     * @param array
529     *     The array to copy or {@code null}.
530     * @return
531     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
532     */
533    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
534    private static int[] copyOf(final int[] array) {
535        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
536        if (array!= null) {
537            final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
538            System.arraycopy(array, 0, copy, 0, array.length);
539            return copy;
540        }
541        return null;
542    }
543 
544    /**
545     * Creates and returns a deep copy of a given array.
546     * 
547     * @param array
548     *     The array to copy or {@code null}.
549     * @return
550     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
551     */
552    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
553    private static long[] copyOf(final long[] array) {
554        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
555        if (array!= null) {
556            final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
557            System.arraycopy(array, 0, copy, 0, array.length);
558            return copy;
559        }
560        return null;
561    }
562 
563    /**
564     * Creates and returns a deep copy of a given array.
565     * 
566     * @param array
567     *     The array to copy or {@code null}.
568     * @return
569     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
570     */
571    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
572    private static short[] copyOf(final short[] array) {
573        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
574        if (array!= null) {
575            final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
576            System.arraycopy(array, 0, copy, 0, array.length);
577            return copy;
578        }
579        return null;
580    }
581 
582    /**
583     * Creates and returns a deep copy of a given {@code JAXBElement} instance.
584     * 
585     * @param element
586     *     The instance to copy or {@code null}.
587     * @return
588     *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
589     */
590    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
591    private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
592        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
593        if (element!= null) {
594            final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
595            copy.setNil(element.isNil());
596            copy.setValue(copyOfObject(copy.getValue()));
597            return copy;
598        }
599        return null;
600    }
601 
602    /**
603     * Creates and returns a deep copy of a given {@code Serializable}.
604     * 
605     * @param serializable
606     *     The instance to copy or {@code null}.
607     * @return
608     *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
609     */
610    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
611    private static Serializable copyOfSerializable(final Serializable serializable) {
612        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
613        if (serializable!= null) {
614            try {
615                final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
616                final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
617                out.writeObject(serializable);
618                out.close();
619                final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
620                final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
621                final Serializable copy = ((Serializable) in.readObject());
622                in.close();
623                return copy;
624            } catch (SecurityException e) {
625                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
626            } catch (ClassNotFoundException e) {
627                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
628            } catch (InvalidClassException e) {
629                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
630            } catch (NotSerializableException e) {
631                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
632            } catch (StreamCorruptedException e) {
633                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
634            } catch (OptionalDataException e) {
635                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
636            } catch (IOException e) {
637                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
638            }
639        }
640        return null;
641    }
642 
643    /**
644     * Creates and returns a deep copy of this object.
645     * 
646     * 
647     * @return
648     *     A deep copy of this object.
649     */
650    @Override
651    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:36:20+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
652    public SchemaType clone() {
653        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
654        return new SchemaType(this);
655    }
656 
657}

[all classes][org.jomc.sdk.model]
EMMA 2.0.5312 (C) Vladimir Roubtsov