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

COVERAGE SUMMARY FOR SOURCE FILE [Modlet.java]

nameclass, %method, %block, %line, %
Modlet.java100% (1/1)37%  (13/35)4%   (45/1148)8%   (20/238)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Modlet100% (1/1)37%  (13/35)4%   (45/1148)8%   (20/238)
Modlet (Modlet): void 0%   (0/1)0%   (0/85)0%   (0/12)
clone (): Modlet 0%   (0/1)0%   (0/83)0%   (0/11)
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): JAXBElement 0%   (0/1)0%   (0/7)0%   (0/1)
getAnyElement (String, String, Class): JAXBElement 0%   (0/1)0%   (0/8)0%   (0/1)
getAnyElements (String, String): List 0%   (0/1)0%   (0/7)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)
Modlet (): void 100% (1/1)100% (3/3)100% (2/2)
getModel (): String 100% (1/1)100% (3/3)100% (1/1)
getName (): String 100% (1/1)100% (3/3)100% (1/1)
getSchemas (): Schemas 100% (1/1)100% (3/3)100% (1/1)
getServices (): Services 100% (1/1)100% (3/3)100% (1/1)
getVendor (): String 100% (1/1)100% (3/3)100% (1/1)
getVersion (): String 100% (1/1)100% (3/3)100% (1/1)
setModel (String): void 100% (1/1)100% (4/4)100% (2/2)
setName (String): void 100% (1/1)100% (4/4)100% (2/2)
setSchemas (Schemas): void 100% (1/1)100% (4/4)100% (2/2)
setServices (Services): void 100% (1/1)100% (4/4)100% (2/2)
setVendor (String): void 100% (1/1)100% (4/4)100% (2/2)
setVersion (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.XmlElement;
48import javax.xml.bind.annotation.XmlType;
49import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
50import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
51import javax.xml.datatype.Duration;
52import javax.xml.datatype.XMLGregorianCalendar;
53import javax.xml.namespace.QName;
54import org.w3c.dom.Element;
55 
56 
57/**
58 * 
59 *         Modlet.
60 * 
61 *         The 'Modlet' type defines attributes 'name', 'model', 'vendor' and 'version'. Attribute 'name' holds an identifier
62 *         uniquely identifying the modlet in a set of modlets. Attribute 'model' holds an identifier of the model the modlet is
63 *         part of. Attribute 'vendor' holds information regarding the vendor of the modlet. Attribute 'version' holds the version
64 *         of the modlet.
65 *       
66 * 
67 * <p>Java class for Modlet complex type.
68 * 
69 * <p>The following schema fragment specifies the expected content contained within this class.
70 * 
71 * <pre>
72 * &lt;complexType name="Modlet">
73 *   &lt;complexContent>
74 *     &lt;extension base="{http://jomc.org/modlet}ModletObject">
75 *       &lt;sequence>
76 *         &lt;element ref="{http://jomc.org/modlet}schemas" minOccurs="0"/>
77 *         &lt;element ref="{http://jomc.org/modlet}services" minOccurs="0"/>
78 *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
79 *       &lt;/sequence>
80 *       &lt;attribute name="name" use="required" type="{http://jomc.org/modlet}String" />
81 *       &lt;attribute name="model" type="{http://jomc.org/modlet}Identifier" />
82 *       &lt;attribute name="vendor" type="{http://jomc.org/modlet}String" />
83 *       &lt;attribute name="version" type="{http://jomc.org/modlet}Version" />
84 *     &lt;/extension>
85 *   &lt;/complexContent>
86 * &lt;/complexType>
87 * </pre>
88 * 
89 * 
90 */
91@XmlAccessorType(XmlAccessType.FIELD)
92@XmlType(name = "Modlet", namespace = "http://jomc.org/modlet", propOrder = {
93    "schemas",
94    "services",
95    "any"
96})
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")
98public class Modlet
99    extends ModletObject
100    implements Cloneable
101{
102 
103    @XmlElement(namespace = "http://jomc.org/modlet")
104    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
105    protected Schemas schemas;
106    @XmlElement(namespace = "http://jomc.org/modlet")
107    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
108    protected Services services;
109    @XmlAnyElement(lax = true)
110    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
111    protected List<Object> any;
112    @XmlAttribute(name = "name", required = true)
113    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
114    protected String name;
115    @XmlAttribute(name = "model")
116    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
117    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
118    protected String model;
119    @XmlAttribute(name = "vendor")
120    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
121    protected String vendor;
122    @XmlAttribute(name = "version")
123    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
124    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
125    protected String version;
126 
127    /**
128     * Creates a new {@code Modlet} instance.
129     * 
130     */
131    public Modlet() {
132        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
133        super();
134    }
135 
136    /**
137     * Creates a new {@code Modlet} instance by deeply copying a given {@code Modlet} instance.
138     * 
139     * 
140     * @param o
141     *     The instance to copy.
142     * @throws NullPointerException
143     *     if {@code o} is {@code null}.
144     */
145    public Modlet(final Modlet o) {
146        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
147        super(o);
148        if (o == null) {
149            throw new NullPointerException("Cannot create a copy of 'Modlet' from 'null'.");
150        }
151        // CClassInfo: org.jomc.modlet.Schemas
152        this.schemas = ((o.schemas == null)?null:((o.getSchemas() == null)?null:o.getSchemas().clone()));
153        // CClassInfo: org.jomc.modlet.Services
154        this.services = ((o.services == null)?null:((o.getServices() == null)?null:o.getServices().clone()));
155        // 'Any' collection.
156        if (o.any!= null) {
157            copyAny(o.getAny(), this.getAny());
158        }
159        // CBuiltinLeafInfo: java.lang.String
160        this.name = ((o.name == null)?null:o.getName());
161        // CBuiltinLeafInfo: java.lang.String
162        this.model = ((o.model == null)?null:o.getModel());
163        // CBuiltinLeafInfo: java.lang.String
164        this.vendor = ((o.vendor == null)?null:o.getVendor());
165        // CBuiltinLeafInfo: java.lang.String
166        this.version = ((o.version == null)?null:o.getVersion());
167    }
168 
169    /**
170     * Gets the value of the schemas property.
171     * 
172     * @return
173     *     possible object is
174     *     {@link Schemas }
175     *     
176     */
177    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
178    public Schemas getSchemas() {
179        return schemas;
180    }
181 
182    /**
183     * Sets the value of the schemas property.
184     * 
185     * @param value
186     *     allowed object is
187     *     {@link Schemas }
188     *     
189     */
190    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
191    public void setSchemas(Schemas value) {
192        this.schemas = value;
193    }
194 
195    /**
196     * Gets the value of the services property.
197     * 
198     * @return
199     *     possible object is
200     *     {@link Services }
201     *     
202     */
203    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
204    public Services getServices() {
205        return services;
206    }
207 
208    /**
209     * Sets the value of the services property.
210     * 
211     * @param value
212     *     allowed object is
213     *     {@link Services }
214     *     
215     */
216    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
217    public void setServices(Services value) {
218        this.services = value;
219    }
220 
221    /**
222     * Gets the value of the any property.
223     * 
224     * <p>
225     * This accessor method returns a reference to the live list,
226     * not a snapshot. Therefore any modification you make to the
227     * returned list will be present inside the JAXB object.
228     * This is why there is not a <CODE>set</CODE> method for the any property.
229     * 
230     * <p>
231     * For example, to add a new item, do as follows:
232     * <pre>
233     *    getAny().add(newItem);
234     * </pre>
235     * 
236     * 
237     * <p>
238     * Objects of the following type(s) are allowed in the list
239     * {@link Object }
240     * {@link Element }
241     * 
242     * 
243     */
244    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
245    public List<Object> getAny() {
246        if (any == null) {
247            any = new ArrayList<Object>();
248        }
249        return this.any;
250    }
251 
252    /**
253     * The name of the modlet.
254     * 
255     * @return
256     *     possible object is
257     *     {@link String }
258     *     
259     */
260    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
261    public String getName() {
262        return name;
263    }
264 
265    /**
266     * Sets the value of the name property.
267     * 
268     * @param value
269     *     allowed object is
270     *     {@link String }
271     *     
272     */
273    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
274    public void setName(String value) {
275        this.name = value;
276    }
277 
278    /**
279     * The identifier of the model the modlet is part of or {@code null}.
280     * 
281     * @return
282     *     possible object is
283     *     {@link String }
284     *     
285     */
286    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
287    public String getModel() {
288        return model;
289    }
290 
291    /**
292     * Sets the value of the model property.
293     * 
294     * @param value
295     *     allowed object is
296     *     {@link String }
297     *     
298     */
299    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
300    public void setModel(String value) {
301        this.model = value;
302    }
303 
304    /**
305     * The vendor of the modlet or {@code null}.
306     * 
307     * @return
308     *     possible object is
309     *     {@link String }
310     *     
311     */
312    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
313    public String getVendor() {
314        return vendor;
315    }
316 
317    /**
318     * Sets the value of the vendor property.
319     * 
320     * @param value
321     *     allowed object is
322     *     {@link String }
323     *     
324     */
325    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
326    public void setVendor(String value) {
327        this.vendor = value;
328    }
329 
330    /**
331     * The version of the modlet or {@code null}.
332     * 
333     * @return
334     *     possible object is
335     *     {@link String }
336     *     
337     */
338    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
339    public String getVersion() {
340        return version;
341    }
342 
343    /**
344     * Sets the value of the version property.
345     * 
346     * @param value
347     *     allowed object is
348     *     {@link String }
349     *     
350     */
351    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
352    public void setVersion(String value) {
353        this.version = value;
354    }
355 
356    /**
357     * Copies all values of property {@code Any} deeply.
358     * 
359     * @param source
360     *     The source to copy from.
361     * @param target
362     *     The target to copy {@code source} to.
363     * @throws NullPointerException
364     *     if {@code target} is {@code null}.
365     */
366    @SuppressWarnings("unchecked")
367    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
368    private static void copyAny(final List<Object> source, final List<Object> target) {
369        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
370        if ((source!= null)&&(!source.isEmpty())) {
371            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
372                final Object next = it.next();
373                if (next instanceof Element) {
374                    // CWildcardTypeInfo: org.w3c.dom.Element
375                    target.add(((Element)((Element) next).cloneNode(true)));
376                    continue;
377                }
378                if (next instanceof Object) {
379                    // CBuiltinLeafInfo: java.lang.Object
380                    target.add(copyOf(((Object) next)));
381                    continue;
382                }
383                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
384                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.modlet.Modlet'."));
385            }
386        }
387    }
388 
389    /**
390     * Creates and returns a deep copy of a given object.
391     * 
392     * @param o
393     *     The instance to copy or {@code null}.
394     * @return
395     *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
396     */
397    @SuppressWarnings("unchecked")
398    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
399    private static Object copyOf(final Object o) {
400        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
401        try {
402            if (o!= null) {
403                if (o.getClass().isPrimitive()) {
404                    return o;
405                }
406                if (o.getClass().isArray()) {
407                    return copyOfArray(o);
408                }
409                // Immutable types.
410                if (o instanceof Boolean) {
411                    return o;
412                }
413                if (o instanceof Byte) {
414                    return o;
415                }
416                if (o instanceof Character) {
417                    return o;
418                }
419                if (o instanceof Double) {
420                    return o;
421                }
422                if (o instanceof Enum) {
423                    return o;
424                }
425                if (o instanceof Float) {
426                    return o;
427                }
428                if (o instanceof Integer) {
429                    return o;
430                }
431                if (o instanceof Long) {
432                    return o;
433                }
434                if (o instanceof Short) {
435                    return o;
436                }
437                if (o instanceof String) {
438                    return o;
439                }
440                if (o instanceof BigDecimal) {
441                    return o;
442                }
443                if (o instanceof BigInteger) {
444                    return o;
445                }
446                if (o instanceof UUID) {
447                    return o;
448                }
449                if (o instanceof QName) {
450                    return o;
451                }
452                if (o instanceof Duration) {
453                    return o;
454                }
455                if (o instanceof Currency) {
456                    return o;
457                }
458                // String based types.
459                if (o instanceof File) {
460                    return new File(o.toString());
461                }
462                if (o instanceof URI) {
463                    return new URI(o.toString());
464                }
465                if (o instanceof URL) {
466                    return new URL(o.toString());
467                }
468                if (o instanceof MimeType) {
469                    return new MimeType(o.toString());
470                }
471                // Cloneable types.
472                if (o instanceof XMLGregorianCalendar) {
473                    return ((XMLGregorianCalendar) o).clone();
474                }
475                if (o instanceof Date) {
476                    return ((Date) o).clone();
477                }
478                if (o instanceof Calendar) {
479                    return ((Calendar) o).clone();
480                }
481                if (o instanceof TimeZone) {
482                    return ((TimeZone) o).clone();
483                }
484                if (o instanceof Locale) {
485                    return ((Locale) o).clone();
486                }
487                if (o instanceof Element) {
488                    return ((Element)((Element) o).cloneNode(true));
489                }
490                if (o instanceof JAXBElement) {
491                    return copyOf(((JAXBElement) o));
492                }
493                try {
494                    return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
495                } catch (NoSuchMethodException e) {
496                    if (o instanceof Serializable) {
497                        return copyOf(((Serializable) o));
498                    }
499                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
500                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
501                } catch (IllegalAccessException e) {
502                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
503                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
504                } catch (InvocationTargetException e) {
505                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
506                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
507                } catch (SecurityException e) {
508                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
509                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
510                } catch (IllegalArgumentException e) {
511                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
512                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
513                } catch (ExceptionInInitializerError e) {
514                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
515                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
516                }
517            }
518            return null;
519        } catch (URISyntaxException e) {
520            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
521        } catch (MimeTypeParseException e) {
522            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
523        } catch (MalformedURLException e) {
524            throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
525        }
526    }
527 
528    /**
529     * Creates and returns a deep copy of a given array.
530     * 
531     * @param array
532     *     The array to copy or {@code null}.
533     * @return
534     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
535     */
536    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
537    private static Object copyOfArray(final Object array) {
538        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
539        if (array!= null) {
540            if (array.getClass() == boolean[].class) {
541                return copyOf(((boolean[]) array));
542            }
543            if (array.getClass() == byte[].class) {
544                return copyOf(((byte[]) array));
545            }
546            if (array.getClass() == char[].class) {
547                return copyOf(((char[]) array));
548            }
549            if (array.getClass() == double[].class) {
550                return copyOf(((double[]) array));
551            }
552            if (array.getClass() == float[].class) {
553                return copyOf(((float[]) array));
554            }
555            if (array.getClass() == int[].class) {
556                return copyOf(((int[]) array));
557            }
558            if (array.getClass() == long[].class) {
559                return copyOf(((long[]) array));
560            }
561            if (array.getClass() == short[].class) {
562                return copyOf(((short[]) array));
563            }
564            final int len = Array.getLength(array);
565            final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
566            for (int i = (len- 1); (i >= 0); i--) {
567                Array.set(copy, i, copyOf(Array.get(array, i)));
568            }
569            return copy;
570        }
571        return null;
572    }
573 
574    /**
575     * Creates and returns a deep copy of a given array.
576     * 
577     * @param array
578     *     The array to copy or {@code null}.
579     * @return
580     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
581     */
582    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
583    private static boolean[] copyOf(final boolean[] array) {
584        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
585        if (array!= null) {
586            final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
587            System.arraycopy(array, 0, copy, 0, array.length);
588            return copy;
589        }
590        return null;
591    }
592 
593    /**
594     * Creates and returns a deep copy of a given array.
595     * 
596     * @param array
597     *     The array to copy or {@code null}.
598     * @return
599     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
600     */
601    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
602    private static byte[] copyOf(final byte[] array) {
603        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
604        if (array!= null) {
605            final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
606            System.arraycopy(array, 0, copy, 0, array.length);
607            return copy;
608        }
609        return null;
610    }
611 
612    /**
613     * Creates and returns a deep copy of a given array.
614     * 
615     * @param array
616     *     The array to copy or {@code null}.
617     * @return
618     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
619     */
620    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
621    private static char[] copyOf(final char[] array) {
622        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
623        if (array!= null) {
624            final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
625            System.arraycopy(array, 0, copy, 0, array.length);
626            return copy;
627        }
628        return null;
629    }
630 
631    /**
632     * Creates and returns a deep copy of a given array.
633     * 
634     * @param array
635     *     The array to copy or {@code null}.
636     * @return
637     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
638     */
639    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
640    private static double[] copyOf(final double[] array) {
641        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
642        if (array!= null) {
643            final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
644            System.arraycopy(array, 0, copy, 0, array.length);
645            return copy;
646        }
647        return null;
648    }
649 
650    /**
651     * Creates and returns a deep copy of a given array.
652     * 
653     * @param array
654     *     The array to copy or {@code null}.
655     * @return
656     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
657     */
658    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
659    private static float[] copyOf(final float[] array) {
660        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
661        if (array!= null) {
662            final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
663            System.arraycopy(array, 0, copy, 0, array.length);
664            return copy;
665        }
666        return null;
667    }
668 
669    /**
670     * Creates and returns a deep copy of a given array.
671     * 
672     * @param array
673     *     The array to copy or {@code null}.
674     * @return
675     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
676     */
677    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
678    private static int[] copyOf(final int[] array) {
679        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
680        if (array!= null) {
681            final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
682            System.arraycopy(array, 0, copy, 0, array.length);
683            return copy;
684        }
685        return null;
686    }
687 
688    /**
689     * Creates and returns a deep copy of a given array.
690     * 
691     * @param array
692     *     The array to copy or {@code null}.
693     * @return
694     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
695     */
696    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
697    private static long[] copyOf(final long[] array) {
698        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
699        if (array!= null) {
700            final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
701            System.arraycopy(array, 0, copy, 0, array.length);
702            return copy;
703        }
704        return null;
705    }
706 
707    /**
708     * Creates and returns a deep copy of a given array.
709     * 
710     * @param array
711     *     The array to copy or {@code null}.
712     * @return
713     *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
714     */
715    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
716    private static short[] copyOf(final short[] array) {
717        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
718        if (array!= null) {
719            final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
720            System.arraycopy(array, 0, copy, 0, array.length);
721            return copy;
722        }
723        return null;
724    }
725 
726    /**
727     * Creates and returns a deep copy of a given {@code JAXBElement} instance.
728     * 
729     * @param element
730     *     The instance to copy or {@code null}.
731     * @return
732     *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
733     */
734    @SuppressWarnings("unchecked")
735    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
736    private static JAXBElement copyOf(final JAXBElement element) {
737        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
738        if (element!= null) {
739            final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
740            copy.setNil(element.isNil());
741            copy.setValue(copyOf(copy.getValue()));
742            return copy;
743        }
744        return null;
745    }
746 
747    /**
748     * Creates and returns a deep copy of a given {@code Serializable}.
749     * 
750     * @param serializable
751     *     The instance to copy or {@code null}.
752     * @return
753     *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
754     */
755    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
756    private static Serializable copyOf(final Serializable serializable) {
757        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
758        if (serializable!= null) {
759            try {
760                final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
761                final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
762                out.writeObject(serializable);
763                out.close();
764                final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
765                final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
766                final Serializable copy = ((Serializable) in.readObject());
767                in.close();
768                return copy;
769            } catch (SecurityException e) {
770                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
771            } catch (ClassNotFoundException e) {
772                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
773            } catch (InvalidClassException e) {
774                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
775            } catch (NotSerializableException e) {
776                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
777            } catch (StreamCorruptedException e) {
778                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
779            } catch (OptionalDataException e) {
780                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
781            } catch (IOException e) {
782                throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
783            }
784        }
785        return null;
786    }
787 
788    /**
789     * Creates and returns a deep copy of this object.
790     * 
791     * 
792     * @return
793     *     A deep copy of this object.
794     */
795    @Override
796    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-03T04:56:19+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
797    public Modlet clone() {
798        {
799            // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
800            final Modlet clone = ((Modlet) super.clone());
801            // CClassInfo: org.jomc.modlet.Schemas
802            clone.schemas = ((this.schemas == null)?null:((this.getSchemas() == null)?null:this.getSchemas().clone()));
803            // CClassInfo: org.jomc.modlet.Services
804            clone.services = ((this.services == null)?null:((this.getServices() == null)?null:this.getServices().clone()));
805            // 'Any' collection.
806            if (this.any!= null) {
807                clone.any = null;
808                copyAny(this.getAny(), clone.getAny());
809            }
810            // CBuiltinLeafInfo: java.lang.String
811            clone.name = ((this.name == null)?null:this.getName());
812            // CBuiltinLeafInfo: java.lang.String
813            clone.model = ((this.model == null)?null:this.getModel());
814            // CBuiltinLeafInfo: java.lang.String
815            clone.vendor = ((this.vendor == null)?null:this.getVendor());
816            // CBuiltinLeafInfo: java.lang.String
817            clone.version = ((this.version == null)?null:this.getVersion());
818            return clone;
819        }
820    }
821    
822    /**
823     * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
824     * instance.
825     *
826     * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
827     * @param localPart The local part of the {@code JAXBElement} to return.
828     *
829     * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
830     * of the instance or {@code null}, if no such element is found.
831     *
832     * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}.
833     * @throws IllegalStateException if the {@code any} property contains more than one matching element.
834     *
835     * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String)
836     *
837     * @deprecated As of JOMC 1.1, please use method {@link #getAnyElement(java.lang.String, java.lang.String, java.lang.Class)}.
838     * This method will be removed in version 2.0.
839     */
840    @Deprecated
841    public javax.xml.bind.JAXBElement getAnyElement( final String namespaceURI, final String localPart )
842    {
843        return this.getAnyElement( this.getAny(), namespaceURI, localPart );
844    }
845 
846    /**
847     * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
848     * property of the instance.
849     *
850     * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
851     * @param localPart The local part of the {@code JAXBElement}s to return.
852     *
853     * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
854     * the {@code any} property of the instance - an empty list if no such elements are found.
855     *
856     * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}.
857     *
858     * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String)
859     *
860     * @deprecated As of JOMC 1.1, please use method {@link #getAnyElements(java.lang.String, java.lang.String, java.lang.Class)}.
861     * This method will be removed in version 2.0.
862     */
863    @Deprecated
864    public java.util.List<javax.xml.bind.JAXBElement> getAnyElements( final String namespaceURI,
865                                                                      final String localPart )
866    {
867        return this.getAnyElements( this.getAny(), namespaceURI, localPart );
868    }
869 
870    /**
871     * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
872     * instance.
873     *
874     * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
875     * @param localPart The local part of the {@code JAXBElement} to return.
876     * @param type The class of the type the element is bound to.
877     * @param <T> The type the element is bound to.
878     *
879     * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
880     * of the instance or {@code null}, if no such element is found.
881     *
882     * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
883     * @throws IllegalStateException if the {@code any} property contains more than one matching element.
884     *
885     * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
886     *
887     * @since 1.1
888     */
889    public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
890                                                            final Class<T> type )
891    {
892        return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
893    }
894 
895    /**
896     * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
897     * property of the instance.
898     *
899     * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
900     * @param localPart The local part of the {@code JAXBElement}s to return.
901     * @param type The class of the type the elements are bound to.
902     * @param <T> The type the elements are bound to.
903     *
904     * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
905     * the {@code any} property of the instance - an empty list if no such elements are found.
906     *
907     * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
908     *
909     * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
910     *
911     * @since 1.1
912     */
913    public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
914                                                                             final String localPart,
915                                                                             final Class<T> type )
916    {
917        return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
918    }
919 
920    /**
921     * Gets a single object matching a given class from the {@code any} property of the instance.
922     *
923     * @param clazz The class to return an instance of.
924     * @param <T> The type of the object to return.
925     *
926     * @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such
927     * instance is found.
928     *
929     * @throws NullPointerException if {@code clazz} is {@code null}.
930     * @throws IllegalStateException if the {@code any} property contains more than one matching object.
931     *
932     * @see #getAnyObject(java.util.List, java.lang.Class)
933     */
934    public <T> T getAnyObject( final Class<T> clazz )
935    {
936        return this.getAnyObject( this.getAny(), clazz );
937    }
938 
939    /**
940     * Gets a list containing all objects matching a given class from the {@code any} property of the instance.
941     *
942     * @param clazz The class to return all instances of.
943     * @param <T> The type of the objects to return.
944     *
945     * @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance -
946     * an empty list if no such objects are found.
947     *
948     * @throws NullPointerException if {@code clazz} is {@code null}.
949     *
950     * @see #getAnyObjects(java.util.List, java.lang.Class)
951     */
952    public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
953    {
954        return this.getAnyObjects( this.getAny(), clazz );
955    }
956      
957}

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