EMMA Coverage Report (generated Tue Jun 29 17:59:02 CEST 2010)
[all classes][org.jomc.standalone.model]

COVERAGE SUMMARY FOR SOURCE FILE [ExceptionsType.java]

nameclass, %method, %block, %line, %
ExceptionsType.java100% (1/1)9%   (2/23)1%   (11/940)2%   (3.5/208)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ExceptionsType100% (1/1)9%   (2/23)1%   (11/940)2%   (3.5/208)
ExceptionsType (ExceptionsType): void 0%   (0/1)0%   (0/40)0%   (0/9)
clone (): ExceptionsType 0%   (0/1)0%   (0/5)0%   (0/1)
copyAny (List, List): void 0%   (0/1)0%   (0/48)0%   (0/11)
copyException (List, List): void 0%   (0/1)0%   (0/37)0%   (0/8)
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)
getAny (): List 0%   (0/1)0%   (0/11)0%   (0/3)
getException (): List 0%   (0/1)0%   (0/11)0%   (0/3)
getException (String): ExceptionType 0%   (0/1)0%   (0/28)0%   (0/6)
getOtherAttributes (): Map 0%   (0/1)0%   (0/3)0%   (0/1)
setDefaultException (ExceptionType): void 0%   (0/1)0%   (0/4)0%   (0/2)
ExceptionsType (): void 100% (1/1)100% (8/8)100% (3/3)
getDefaultException (): ExceptionType 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:55:18 PM CEST 
6//
7 
8 
9package org.jomc.standalone.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.XmlElement;
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 * List of exceptions.
52 * 
53 * <p>Java class for ExceptionsType complex type.
54 * 
55 * <p>The following schema fragment specifies the expected content contained within this class.
56 * 
57 * <pre>
58 * &lt;complexType name="ExceptionsType">
59 *   &lt;complexContent>
60 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
61 *       &lt;sequence>
62 *         &lt;element ref="{http://jomc.org/standalone/model}exception" maxOccurs="unbounded" minOccurs="0"/>
63 *         &lt;element name="default-exception" type="{http://jomc.org/standalone/model}ExceptionType" minOccurs="0"/>
64 *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
65 *       &lt;/sequence>
66 *       &lt;anyAttribute processContents='lax'/>
67 *     &lt;/restriction>
68 *   &lt;/complexContent>
69 * &lt;/complexType>
70 * </pre>
71 * 
72 * 
73 */
74@XmlAccessorType(XmlAccessType.FIELD)
75@XmlType(name = "ExceptionsType", propOrder = {
76    "exception",
77    "defaultException",
78    "any"
79})
80@Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
81public class ExceptionsType implements Cloneable
82{
83 
84    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
85    protected List<ExceptionType> exception;
86    @XmlElement(name = "default-exception")
87    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
88    protected ExceptionType defaultException;
89    @XmlAnyElement(lax = true)
90    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
91    protected List<Object> any;
92    @XmlAnyAttribute
93    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
94    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
95 
96    /**
97     * Creates a new {@code ExceptionsType} instance.
98     * 
99     */
100    public ExceptionsType() {
101        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
102        super();
103    }
104 
105    /**
106     * Creates a new {@code ExceptionsType} instance by deeply copying a given {@code ExceptionsType} instance.
107     * 
108     * 
109     * @param o
110     *     The instance to copy.
111     * @throws NullPointerException
112     *     if {@code o} is {@code null}.
113     */
114    public ExceptionsType(final ExceptionsType o) {
115        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
116        super();
117        if (o == null) {
118            throw new NullPointerException("Cannot create a copy of 'ExceptionsType' from 'null'.");
119        }
120        // 'Exception' collection.
121        copyException(o.getException(), getException());
122        // CClassInfo: org.jomc.standalone.model.ExceptionType
123        this.defaultException = ((o.getDefaultException() == null)?null:o.getDefaultException().clone());
124        // 'Any' collection.
125        copyAny(o.getAny(), getAny());
126        // Other attributes.
127        this.otherAttributes.putAll(o.otherAttributes);
128    }
129 
130    /**
131     * Exceptions to handle.Gets the value of the exception property.
132     * 
133     * <p>
134     * This accessor method returns a reference to the live list,
135     * not a snapshot. Therefore any modification you make to the
136     * returned list will be present inside the JAXB object.
137     * This is why there is not a <CODE>set</CODE> method for the exception property.
138     * 
139     * <p>
140     * For example, to add a new item, do as follows:
141     * <pre>
142     *    getException().add(newItem);
143     * </pre>
144     * 
145     * 
146     * <p>
147     * Objects of the following type(s) are allowed in the list
148     * {@link ExceptionType }
149     * 
150     * 
151     */
152    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
153    public List<ExceptionType> getException() {
154        if (exception == null) {
155            exception = new ArrayList<ExceptionType>();
156        }
157        return this.exception;
158    }
159 
160    /**
161     * Exception to throw for any unhandled exceptions.
162     * 
163     * @return
164     *     possible object is
165     *     {@link ExceptionType }
166     *     
167     */
168    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
169    public ExceptionType getDefaultException() {
170        return defaultException;
171    }
172 
173    /**
174     * Sets the value of the defaultException property.
175     * 
176     * @param value
177     *     allowed object is
178     *     {@link ExceptionType }
179     *     
180     */
181    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
182    public void setDefaultException(ExceptionType value) {
183        this.defaultException = value;
184    }
185 
186    /**
187     * Gets the value of the any property.
188     * 
189     * <p>
190     * This accessor method returns a reference to the live list,
191     * not a snapshot. Therefore any modification you make to the
192     * returned list will be present inside the JAXB object.
193     * This is why there is not a <CODE>set</CODE> method for the any property.
194     * 
195     * <p>
196     * For example, to add a new item, do as follows:
197     * <pre>
198     *    getAny().add(newItem);
199     * </pre>
200     * 
201     * 
202     * <p>
203     * Objects of the following type(s) are allowed in the list
204     * {@link Element }
205     * {@link Object }
206     * 
207     * 
208     */
209    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
210    public List<Object> getAny() {
211        if (any == null) {
212            any = new ArrayList<Object>();
213        }
214        return this.any;
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:55:18+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 Exception} 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:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
248    private static void copyException(final List<ExceptionType> source, final List<ExceptionType> 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 ExceptionType) {
254                    // CClassInfo: org.jomc.standalone.model.ExceptionType
255                    target.add(((ExceptionType) next).clone());
256                    continue;
257                }
258                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
259                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Exception' of class 'org.jomc.standalone.model.ExceptionsType'."));
260            }
261        }
262    }
263 
264    /**
265     * Copies all values of property {@code Any} deeply.
266     * 
267     * @param target
268     *     The target to copy {@code source} to.
269     * @param source
270     *     The source to copy from.
271     * @throws NullPointerException
272     *     if {@code source} or {@code target} is {@code null}.
273     */
274    @SuppressWarnings("unchecked")
275    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02: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.3 Build 2010-02-27T15:04:03+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.standalone.model.ExceptionsType'."));
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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
306    private static Object copyOfObject(final Object o) {
307        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
421    private static Object copyOfArray(final Object array) {
422        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
467    private static boolean[] copyOf(final boolean[] array) {
468        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
486    private static byte[] copyOf(final byte[] array) {
487        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
505    private static char[] copyOf(final char[] array) {
506        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
524    private static double[] copyOf(final double[] array) {
525        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
543    private static float[] copyOf(final float[] array) {
544        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
562    private static int[] copyOf(final int[] array) {
563        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
581    private static long[] copyOf(final long[] array) {
582        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
600    private static short[] copyOf(final short[] array) {
601        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
619    private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
620        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
639    private static Serializable copyOfSerializable(final Serializable serializable) {
640        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+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 = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
680    public ExceptionsType clone() {
681        // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
682        return new ExceptionsType(this);
683    }
684    
685    /**
686     * Gets an exception for a given class name from this list of exceptions.
687     *
688     * @param clazz The class of the exception to return.
689     *
690     * @return The exception matching {@code clazz} from this list or {@code null} if no exception matching
691     * {@code clazz} is found.
692     *
693     * @throws NullPointerException if {@code clazz} is {@code null}.
694     */
695    public ExceptionType getException( final String clazz )
696    {
697        if ( clazz == null )
698        {
699            throw new NullPointerException( "clazz" );
700        }
701 
702        for ( ExceptionType e : this.getException() )
703        {
704            if ( clazz.equals( e.getClazz() ) )
705            {
706                return e;
707            }
708        }
709 
710        return null;
711    }
712      
713}

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