EMMA Coverage Report (generated Thu Jan 03 04:54:40 CET 2013)
[all classes][org.jomc.modlet]

COVERAGE SUMMARY FOR SOURCE FILE [Property.java]

nameclass, %method, %block, %line, %
Property.java100% (1/1)20%  (5/25)2%   (17/1010)4%   (8/216)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Property100% (1/1)20%  (5/25)2%   (17/1010)4%   (8/216)
Property (Property): void 0%   (0/1)0%   (0/37)0%   (0/8)
clone (): Property 0%   (0/1)0%   (0/35)0%   (0/7)
copyAny (List, List): void 0%   (0/1)0%   (0/50)0%   (0/11)
copyOf (JAXBElement): JAXBElement 0%   (0/1)0%   (0/27)0%   (0/6)
copyOf (Object): Object 0%   (0/1)0%   (0/364)0%   (0/81)
copyOf (Serializable): Serializable 0%   (0/1)0%   (0/163)0%   (0/25)
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)
getAny (): List 0%   (0/1)0%   (0/11)0%   (0/3)
getAnyElement (String, String, Class): JAXBElement 0%   (0/1)0%   (0/8)0%   (0/1)
getAnyElements (String, String, Class): List 0%   (0/1)0%   (0/8)0%   (0/1)
getAnyObject (Class): Object 0%   (0/1)0%   (0/6)0%   (0/1)
getAnyObjects (Class): List 0%   (0/1)0%   (0/6)0%   (0/1)
Property (): void 100% (1/1)100% (3/3)100% (2/2)
getName (): String 100% (1/1)100% (3/3)100% (1/1)
getValue (): String 100% (1/1)100% (3/3)100% (1/1)
setName (String): void 100% (1/1)100% (4/4)100% (2/2)
setValue (String): void 100% (1/1)100% (4/4)100% (2/2)

1//
2// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
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: 2013.01.03 at 04:56:19 AM CET 
6//
7 
8 
9package org.jomc.modlet;
10 
11import java.io.ByteArrayInputStream;
12import java.io.ByteArrayOutputStream;
13import java.io.File;
14import java.io.IOException;
15import java.io.InvalidClassException;
16import java.io.NotSerializableException;
17import java.io.ObjectInputStream;
18import java.io.ObjectOutputStream;
19import java.io.OptionalDataException;
20import java.io.Serializable;
21import java.io.StreamCorruptedException;
22import java.lang.reflect.Array;
23import java.lang.reflect.InvocationTargetException;
24import java.math.BigDecimal;
25import java.math.BigInteger;
26import java.net.MalformedURLException;
27import java.net.URI;
28import java.net.URISyntaxException;
29import java.net.URL;
30import java.util.ArrayList;
31import java.util.Calendar;
32import java.util.Currency;
33import java.util.Date;
34import java.util.Iterator;
35import java.util.List;
36import java.util.Locale;
37import java.util.TimeZone;
38import java.util.UUID;
39import javax.activation.MimeType;
40import javax.activation.MimeTypeParseException;
41import javax.annotation.Generated;
42import javax.xml.bind.JAXBElement;
43import javax.xml.bind.annotation.XmlAccessType;
44import javax.xml.bind.annotation.XmlAccessorType;
45import javax.xml.bind.annotation.XmlAnyElement;
46import javax.xml.bind.annotation.XmlAttribute;
47import javax.xml.bind.annotation.XmlType;
48import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
49import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
50import javax.xml.datatype.Duration;
51import javax.xml.datatype.XMLGregorianCalendar;
52import javax.xml.namespace.QName;
53import org.w3c.dom.Element;
54 
55 
56/**
57 * Property.
58 * 
59 * <p>Java class for Property complex type.
60 * 
61 * <p>The following schema fragment specifies the expected content contained within this class.
62 * 
63 * <pre>
64 * &lt;complexType name="Property">
65 *   &lt;complexContent>
66 *     &lt;extension base="{http://jomc.org/modlet}ModletObject">
67 *       &lt;sequence>
68 *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
69 *       &lt;/sequence>
70 *       &lt;attribute name="name" use="required" type="{http://jomc.org/modlet}Identifier" />
71 *       &lt;attribute name="value" type="{http://jomc.org/modlet}String" />
72 *     &lt;/extension>
73 *   &lt;/complexContent>
74 * &lt;/complexType>
75 * </pre>
76 * 
77 * 
78 */
79@XmlAccessorType(XmlAccessType.FIELD)
80@XmlType(name = "Property", namespace = "http://jomc.org/modlet", propOrder = {
81    "any"
82})
83@Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
84public class Property
85    extends ModletObject
86    implements Cloneable
87{
88 
89    @XmlAnyElement(lax = true)
90    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
91    protected List<Object> any;
92    @XmlAttribute(name = "name", required = true)
93    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
94    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
95    protected String name;
96    @XmlAttribute(name = "value")
97    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
98    protected String value;
99 
100    /**
101     * Creates a new {@code Property} instance.
102     * 
103     */
104    public Property() {
105        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
106        super();
107    }
108 
109    /**
110     * Creates a new {@code Property} instance by deeply copying a given {@code Property} instance.
111     * 
112     * 
113     * @param o
114     *     The instance to copy.
115     * @throws NullPointerException
116     *     if {@code o} is {@code null}.
117     */
118    public Property(final Property o) {
119        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
120        super(o);
121        if (o == null) {
122            throw new NullPointerException("Cannot create a copy of 'Property' from 'null'.");
123        }
124        // 'Any' collection.
125        if (o.any!= null) {
126            copyAny(o.getAny(), this.getAny());
127        }
128        // CBuiltinLeafInfo: java.lang.String
129        this.name = ((o.name == null)?null:o.getName());
130        // CBuiltinLeafInfo: java.lang.String
131        this.value = ((o.value == null)?null:o.getValue());
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 Object }
153     * {@link Element }
154     * 
155     * 
156     */
157    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
158    public List<Object> getAny() {
159        if (any == null) {
160            any = new ArrayList<Object>();
161        }
162        return this.any;
163    }
164 
165    /**
166     * The name of the property.
167     * 
168     * @return
169     *     possible object is
170     *     {@link String }
171     *     
172     */
173    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
174    public String getName() {
175        return name;
176    }
177 
178    /**
179     * Sets the value of the name property.
180     * 
181     * @param value
182     *     allowed object is
183     *     {@link String }
184     *     
185     */
186    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
187    public void setName(String value) {
188        this.name = value;
189    }
190 
191    /**
192     * The value of the property.
193     * 
194     * @return
195     *     possible object is
196     *     {@link String }
197     *     
198     */
199    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
200    public String getValue() {
201        return value;
202    }
203 
204    /**
205     * Sets the value of the value property.
206     * 
207     * @param value
208     *     allowed object is
209     *     {@link String }
210     *     
211     */
212    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
213    public void setValue(String value) {
214        this.value = value;
215    }
216 
217    /**
218     * Copies all values of property {@code Any} deeply.
219     * 
220     * @param source
221     *     The source to copy from.
222     * @param target
223     *     The target to copy {@code source} to.
224     * @throws NullPointerException
225     *     if {@code target} is {@code null}.
226     */
227    @SuppressWarnings("unchecked")
228    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
229    private static void copyAny(final List<Object> source, final List<Object> target) {
230        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
231        if ((source!= null)&&(!source.isEmpty())) {
232            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
233                final Object next = it.next();
234                if (next instanceof Element) {
235                    // CWildcardTypeInfo: org.w3c.dom.Element
236                    target.add(((Element)((Element) next).cloneNode(true)));
237                    continue;
238                }
239                if (next instanceof Object) {
240                    // CBuiltinLeafInfo: java.lang.Object
241                    target.add(copyOf(((Object) next)));
242                    continue;
243                }
244                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
245                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.modlet.Property'."));
246            }
247        }
248    }
249 
250    /**
251     * Creates and returns a deep copy of a given object.
252     * 
253     * @param o
254     *     The instance to copy or {@code null}.
255     * @return
256     *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
257     */
258    @SuppressWarnings("unchecked")
259    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
260    private static Object copyOf(final Object o) {
261        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
262        try {
263            if (o!= null) {
264                if (o.getClass().isPrimitive()) {
265                    return o;
266                }
267                if (o.getClass().isArray()) {
268                    return copyOfArray(o);
269                }
270                // Immutable types.
271                if (o instanceof Boolean) {
272                    return o;
273                }
274                if (o instanceof Byte) {
275                    return o;
276                }
277                if (o instanceof Character) {
278                    return o;
279                }
280                if (o instanceof Double) {
281                    return o;
282                }
283                if (o instanceof Enum) {
284                    return o;
285                }
286                if (o instanceof Float) {
287                    return o;
288                }
289                if (o instanceof Integer) {
290                    return o;
291                }
292                if (o instanceof Long) {
293                    return o;
294                }
295                if (o instanceof Short) {
296                    return o;
297                }
298                if (o instanceof String) {
299                    return o;
300                }
301                if (o instanceof BigDecimal) {
302                    return o;
303                }
304                if (o instanceof BigInteger) {
305                    return o;
306                }
307                if (o instanceof UUID) {
308                    return o;
309                }
310                if (o instanceof QName) {
311                    return o;
312                }
313                if (o instanceof Duration) {
314                    return o;
315                }
316                if (o instanceof Currency) {
317                    return o;
318                }
319                // String based types.
320                if (o instanceof File) {
321                    return new File(o.toString());
322                }
323                if (o instanceof URI) {
324                    return new URI(o.toString());
325                }
326                if (o instanceof URL) {
327                    return new URL(o.toString());
328                }
329                if (o instanceof MimeType) {
330                    return new MimeType(o.toString());
331                }
332                // Cloneable types.
333                if (o instanceof XMLGregorianCalendar) {
334                    return ((XMLGregorianCalendar) o).clone();
335                }
336                if (o instanceof Date) {
337                    return ((Date) o).clone();
338                }
339                if (o instanceof Calendar) {
340                    return ((Calendar) o).clone();
341                }
342                if (o instanceof TimeZone) {
343                    return ((TimeZone) o).clone();
344                }
345                if (o instanceof Locale) {
346                    return ((Locale) o).clone();
347                }
348                if (o instanceof Element) {
349                    return ((Element)((Element) o).cloneNode(true));
350                }
351                if (o instanceof JAXBElement) {
352                    return copyOf(((JAXBElement) o));
353                }
354                try {
355                    return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
356                } catch (NoSuchMethodException e) {
357                    if (o instanceof Serializable) {
358                        return copyOf(((Serializable) o));
359                    }
360                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
361                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
362                } catch (IllegalAccessException e) {
363                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
364                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
365                } catch (InvocationTargetException e) {
366                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
367                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
368                } catch (SecurityException e) {
369                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
370                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
371                } catch (IllegalArgumentException e) {
372                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
373                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
374                } catch (ExceptionInInitializerError e) {
375                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
376                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
377                }
378            }
379            return null;
380        } catch (URISyntaxException e) {
381            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
382        } catch (MimeTypeParseException e) {
383            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
384        } catch (MalformedURLException e) {
385            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
386        }
387    }
388 
389    /**
390     * Creates and returns a deep copy of a given array.
391     * 
392     * @param array
393     *     The array to copy or {@code null}.
394     * @return
395     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
396     */
397    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
398    private static Object copyOfArray(final Object array) {
399        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
400        if (array!= null) {
401            if (array.getClass() == boolean[].class) {
402                return copyOf(((boolean[]) array));
403            }
404            if (array.getClass() == byte[].class) {
405                return copyOf(((byte[]) array));
406            }
407            if (array.getClass() == char[].class) {
408                return copyOf(((char[]) array));
409            }
410            if (array.getClass() == double[].class) {
411                return copyOf(((double[]) array));
412            }
413            if (array.getClass() == float[].class) {
414                return copyOf(((float[]) array));
415            }
416            if (array.getClass() == int[].class) {
417                return copyOf(((int[]) array));
418            }
419            if (array.getClass() == long[].class) {
420                return copyOf(((long[]) array));
421            }
422            if (array.getClass() == short[].class) {
423                return copyOf(((short[]) array));
424            }
425            final int len = Array.getLength(array);
426            final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
427            for (int i = (len- 1); (i >= 0); i--) {
428                Array.set(copy, i, copyOf(Array.get(array, i)));
429            }
430            return copy;
431        }
432        return null;
433    }
434 
435    /**
436     * Creates and returns a deep copy of a given array.
437     * 
438     * @param array
439     *     The array to copy or {@code null}.
440     * @return
441     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
442     */
443    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
444    private static boolean[] copyOf(final boolean[] array) {
445        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
446        if (array!= null) {
447            final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
448            System.arraycopy(array, 0, copy, 0, array.length);
449            return copy;
450        }
451        return null;
452    }
453 
454    /**
455     * Creates and returns a deep copy of a given array.
456     * 
457     * @param array
458     *     The array to copy or {@code null}.
459     * @return
460     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
461     */
462    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
463    private static byte[] copyOf(final byte[] array) {
464        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
465        if (array!= null) {
466            final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
467            System.arraycopy(array, 0, copy, 0, array.length);
468            return copy;
469        }
470        return null;
471    }
472 
473    /**
474     * Creates and returns a deep copy of a given array.
475     * 
476     * @param array
477     *     The array to copy or {@code null}.
478     * @return
479     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
480     */
481    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
482    private static char[] copyOf(final char[] array) {
483        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
484        if (array!= null) {
485            final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
486            System.arraycopy(array, 0, copy, 0, array.length);
487            return copy;
488        }
489        return null;
490    }
491 
492    /**
493     * Creates and returns a deep copy of a given array.
494     * 
495     * @param array
496     *     The array to copy or {@code null}.
497     * @return
498     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
499     */
500    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
501    private static double[] copyOf(final double[] array) {
502        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
503        if (array!= null) {
504            final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
505            System.arraycopy(array, 0, copy, 0, array.length);
506            return copy;
507        }
508        return null;
509    }
510 
511    /**
512     * Creates and returns a deep copy of a given array.
513     * 
514     * @param array
515     *     The array to copy or {@code null}.
516     * @return
517     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
518     */
519    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
520    private static float[] copyOf(final float[] array) {
521        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
522        if (array!= null) {
523            final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
524            System.arraycopy(array, 0, copy, 0, array.length);
525            return copy;
526        }
527        return null;
528    }
529 
530    /**
531     * Creates and returns a deep copy of a given array.
532     * 
533     * @param array
534     *     The array to copy or {@code null}.
535     * @return
536     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
537     */
538    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
539    private static int[] copyOf(final int[] array) {
540        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
541        if (array!= null) {
542            final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
543            System.arraycopy(array, 0, copy, 0, array.length);
544            return copy;
545        }
546        return null;
547    }
548 
549    /**
550     * Creates and returns a deep copy of a given array.
551     * 
552     * @param array
553     *     The array to copy or {@code null}.
554     * @return
555     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
556     */
557    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
558    private static long[] copyOf(final long[] array) {
559        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
560        if (array!= null) {
561            final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
562            System.arraycopy(array, 0, copy, 0, array.length);
563            return copy;
564        }
565        return null;
566    }
567 
568    /**
569     * Creates and returns a deep copy of a given array.
570     * 
571     * @param array
572     *     The array to copy or {@code null}.
573     * @return
574     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
575     */
576    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
577    private static short[] copyOf(final short[] array) {
578        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
579        if (array!= null) {
580            final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
581            System.arraycopy(array, 0, copy, 0, array.length);
582            return copy;
583        }
584        return null;
585    }
586 
587    /**
588     * Creates and returns a deep copy of a given {@code JAXBElement} instance.
589     * 
590     * @param element
591     *     The instance to copy or {@code null}.
592     * @return
593     *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
594     */
595    @SuppressWarnings("unchecked")
596    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
597    private static JAXBElement copyOf(final JAXBElement element) {
598        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
599        if (element!= null) {
600            final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
601            copy.setNil(element.isNil());
602            copy.setValue(copyOf(copy.getValue()));
603            return copy;
604        }
605        return null;
606    }
607 
608    /**
609     * Creates and returns a deep copy of a given {@code Serializable}.
610     * 
611     * @param serializable
612     *     The instance to copy or {@code null}.
613     * @return
614     *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
615     */
616    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
617    private static Serializable copyOf(final Serializable serializable) {
618        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
619        if (serializable!= null) {
620            try {
621                final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
622                final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
623                out.writeObject(serializable);
624                out.close();
625                final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
626                final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
627                final Serializable copy = ((Serializable) in.readObject());
628                in.close();
629                return copy;
630            } catch (SecurityException e) {
631                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
632            } catch (ClassNotFoundException e) {
633                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
634            } catch (InvalidClassException e) {
635                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
636            } catch (NotSerializableException e) {
637                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
638            } catch (StreamCorruptedException e) {
639                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
640            } catch (OptionalDataException e) {
641                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
642            } catch (IOException e) {
643                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
644            }
645        }
646        return null;
647    }
648 
649    /**
650     * Creates and returns a deep copy of this object.
651     * 
652     * 
653     * @return
654     *     A deep copy of this object.
655     */
656    @Override
657    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
658    public Property clone() {
659        {
660            // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
661            final Property clone = ((Property) super.clone());
662            // 'Any' collection.
663            if (this.any!= null) {
664                clone.any = null;
665                copyAny(this.getAny(), clone.getAny());
666            }
667            // CBuiltinLeafInfo: java.lang.String
668            clone.name = ((this.name == null)?null:this.getName());
669            // CBuiltinLeafInfo: java.lang.String
670            clone.value = ((this.value == null)?null:this.getValue());
671            return clone;
672        }
673    }
674    
675    /**
676     * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
677     * instance.
678     *
679     * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
680     * @param localPart The local part of the {@code JAXBElement} to return.
681     * @param type The class of the type the element is bound to.
682     * @param <T> The type the element is bound to.
683     *
684     * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
685     * of the instance or {@code null}, if no such element is found.
686     *
687     * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
688     * @throws IllegalStateException if the {@code any} property contains more than one matching element.
689     *
690     * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
691     *
692     * @since 1.2
693     */
694    public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
695                                                            final Class<T> type )
696    {
697        return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
698    }
699 
700    /**
701     * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
702     * property of the instance.
703     *
704     * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
705     * @param localPart The local part of the {@code JAXBElement}s to return.
706     * @param type The class of the type the elements are bound to.
707     * @param <T> The type the elements are bound to.
708     *
709     * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
710     * the {@code any} property of the instance - an empty list if no such elements are found.
711     *
712     * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
713     *
714     * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
715     *
716     * @since 1.2
717     */
718    public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
719                                                                             final String localPart,
720                                                                             final Class<T> type )
721    {
722        return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
723    }
724 
725    /**
726     * Gets a single object matching a given class from the {@code any} property of the instance.
727     *
728     * @param clazz The class to return an instance of.
729     * @param <T> The type of the object to return.
730     *
731     * @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such
732     * instance is found.
733     *
734     * @throws NullPointerException if {@code clazz} is {@code null}.
735     * @throws IllegalStateException if the {@code any} property contains more than one matching object.
736     *
737     * @see #getAnyObject(java.util.List, java.lang.Class)
738     */
739    public <T> T getAnyObject( final Class<T> clazz )
740    {
741        return this.getAnyObject( this.getAny(), clazz );
742    }
743 
744    /**
745     * Gets a list containing all objects matching a given class from the {@code any} property of the instance.
746     *
747     * @param clazz The class to return all instances of.
748     * @param <T> The type of the objects to return.
749     *
750     * @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance -
751     * an empty list if no such objects are found.
752     *
753     * @throws NullPointerException if {@code clazz} is {@code null}.
754     *
755     * @see #getAnyObjects(java.util.List, java.lang.Class)
756     */
757    public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
758    {
759        return this.getAnyObjects( this.getAny(), clazz );
760    }
761      
762}

[all classes][org.jomc.modlet]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov