View Javadoc

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.04.21 at 08:43:16 PM CEST 
6   //
7   
8   
9   package org.jomc.model;
10  
11  import java.io.ByteArrayInputStream;
12  import java.io.ByteArrayOutputStream;
13  import java.io.File;
14  import java.io.IOException;
15  import java.io.InvalidClassException;
16  import java.io.NotSerializableException;
17  import java.io.ObjectInputStream;
18  import java.io.ObjectOutputStream;
19  import java.io.OptionalDataException;
20  import java.io.Serializable;
21  import java.io.StreamCorruptedException;
22  import java.lang.reflect.Array;
23  import java.lang.reflect.InvocationTargetException;
24  import java.math.BigDecimal;
25  import java.math.BigInteger;
26  import java.net.MalformedURLException;
27  import java.net.URI;
28  import java.net.URISyntaxException;
29  import java.net.URL;
30  import java.util.ArrayList;
31  import java.util.Calendar;
32  import java.util.Currency;
33  import java.util.Date;
34  import java.util.Iterator;
35  import java.util.List;
36  import java.util.Locale;
37  import java.util.TimeZone;
38  import java.util.UUID;
39  import javax.activation.MimeType;
40  import javax.activation.MimeTypeParseException;
41  import javax.annotation.Generated;
42  import javax.xml.bind.JAXBElement;
43  import javax.xml.bind.annotation.XmlAccessType;
44  import javax.xml.bind.annotation.XmlAccessorType;
45  import javax.xml.bind.annotation.XmlAnyElement;
46  import javax.xml.bind.annotation.XmlAttribute;
47  import javax.xml.bind.annotation.XmlElement;
48  import javax.xml.bind.annotation.XmlType;
49  import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
50  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
51  import javax.xml.datatype.Duration;
52  import javax.xml.datatype.XMLGregorianCalendar;
53  import javax.xml.namespace.QName;
54  import org.w3c.dom.Element;
55  
56  
57  /**
58   * 
59   * Model of an implementation.
60   * 
61   * The 'Implementation' type defines attributes 'identifier', 'name', 'class', 'classDeclaration', 'location', 'vendor',
62   * 'version', 'final', 'stateless' and 'abstract'. Attribute 'identifier' holds an identifier uniquely identifying the
63   * implementation in a set of implementations. Attribute 'name' holds a name uniquely identifying the implementation for
64   * its implemented specifications. Attribute 'class' holds an identifier of the class providing implementation instances.
65   * Attribute 'classDeclaration' flags the implementation declaring the class providing implementation instances. Attribute
66   * 'location' holds an URI of the location of instances of the implementation. Attribute 'vendor' holds vendor information
67   * for the vendor providing the implementation. Attribute 'version' holds a version of the implementation. Dependencies,
68   * messages, properties and specifications may be inherited from multiple parent implementations. The 'final' attribute
69   * flags an implementation the final node in an inheritance hierarchy. The 'stateless' attribute indicates that instances
70   * of the implementation do not retain state across operations. The 'abstract' attribute flags an implementation abstract.
71   *       
72   * 
73   * <p>Java class for Implementation complex type.
74   * 
75   * <p>The following schema fragment specifies the expected content contained within this class.
76   * 
77   * <pre>
78   * &lt;complexType name="Implementation">
79   *   &lt;complexContent>
80   *     &lt;extension base="{http://jomc.org/model}ModelObject">
81   *       &lt;sequence>
82   *         &lt;element ref="{http://jomc.org/model}specifications" minOccurs="0"/>
83   *         &lt;element ref="{http://jomc.org/model}implementations" minOccurs="0"/>
84   *         &lt;element ref="{http://jomc.org/model}dependencies" minOccurs="0"/>
85   *         &lt;element ref="{http://jomc.org/model}properties" minOccurs="0"/>
86   *         &lt;element ref="{http://jomc.org/model}messages" minOccurs="0"/>
87   *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
88   *       &lt;/sequence>
89   *       &lt;attribute name="identifier" use="required" type="{http://jomc.org/model}Identifier" />
90   *       &lt;attribute name="name" use="required" type="{http://jomc.org/model}Identifier" />
91   *       &lt;attribute name="class" type="{http://jomc.org/model}Identifier" />
92   *       &lt;attribute name="location" type="{http://jomc.org/model}URI" />
93   *       &lt;attribute name="vendor" type="{http://jomc.org/model}String" />
94   *       &lt;attribute name="version" type="{http://jomc.org/model}Version" />
95   *       &lt;attribute name="final" type="{http://jomc.org/model}Flag" default="false" />
96   *       &lt;attribute name="stateless" type="{http://jomc.org/model}Flag" default="false" />
97   *       &lt;attribute name="abstract" type="{http://jomc.org/model}Flag" default="false" />
98   *       &lt;attribute name="classDeclaration" type="{http://jomc.org/model}Flag" default="false" />
99   *     &lt;/extension>
100  *   &lt;/complexContent>
101  * &lt;/complexType>
102  * </pre>
103  * 
104  * 
105  */
106 @XmlAccessorType(XmlAccessType.FIELD)
107 @XmlType(name = "Implementation", namespace = "http://jomc.org/model", propOrder = {
108     "specifications",
109     "implementations",
110     "dependencies",
111     "properties",
112     "messages",
113     "any"
114 })
115 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
116 public class Implementation
117     extends ModelObject
118     implements Cloneable
119 {
120 
121     @XmlElement(namespace = "http://jomc.org/model")
122     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
123     protected Specifications specifications;
124     @XmlElement(namespace = "http://jomc.org/model")
125     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
126     protected Implementations implementations;
127     @XmlElement(namespace = "http://jomc.org/model")
128     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
129     protected Dependencies dependencies;
130     @XmlElement(namespace = "http://jomc.org/model")
131     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
132     protected Properties properties;
133     @XmlElement(namespace = "http://jomc.org/model")
134     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
135     protected Messages messages;
136     @XmlAnyElement(lax = true)
137     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
138     protected List<Object> any;
139     @XmlAttribute(name = "identifier", required = true)
140     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
141     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
142     protected String identifier;
143     @XmlAttribute(name = "name", required = true)
144     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
145     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
146     protected String name;
147     @XmlAttribute(name = "class")
148     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
149     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
150     protected String clazz;
151     @XmlAttribute(name = "location")
152     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
153     protected String location;
154     @XmlAttribute(name = "vendor")
155     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
156     protected String vendor;
157     @XmlAttribute(name = "version")
158     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
159     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
160     protected String version;
161     @XmlAttribute(name = "final")
162     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
163     protected Boolean _final;
164     @XmlAttribute(name = "stateless")
165     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
166     protected Boolean stateless;
167     @XmlAttribute(name = "abstract")
168     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
169     protected Boolean _abstract;
170     @XmlAttribute(name = "classDeclaration")
171     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
172     protected Boolean classDeclaration;
173 
174     /**
175      * Creates a new {@code Implementation} instance.
176      * 
177      */
178     public Implementation() {
179         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
180         super();
181     }
182 
183     /**
184      * Creates a new {@code Implementation} instance by deeply copying a given {@code Implementation} instance.
185      * 
186      * 
187      * @param o
188      *     The instance to copy.
189      * @throws NullPointerException
190      *     if {@code o} is {@code null}.
191      */
192     public Implementation(final Implementation o) {
193         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
194         super(o);
195         if (o == null) {
196             throw new NullPointerException("Cannot create a copy of 'Implementation' from 'null'.");
197         }
198         // CClassInfo: org.jomc.model.Specifications
199         this.specifications = ((o.specifications == null)?null:((o.getSpecifications() == null)?null:o.getSpecifications().clone()));
200         // CClassInfo: org.jomc.model.Implementations
201         this.implementations = ((o.implementations == null)?null:((o.getImplementations() == null)?null:o.getImplementations().clone()));
202         // CClassInfo: org.jomc.model.Dependencies
203         this.dependencies = ((o.dependencies == null)?null:((o.getDependencies() == null)?null:o.getDependencies().clone()));
204         // CClassInfo: org.jomc.model.Properties
205         this.properties = ((o.properties == null)?null:((o.getProperties() == null)?null:o.getProperties().clone()));
206         // CClassInfo: org.jomc.model.Messages
207         this.messages = ((o.messages == null)?null:((o.getMessages() == null)?null:o.getMessages().clone()));
208         // 'Any' collection.
209         if (o.any!= null) {
210             copyAny(o.getAny(), this.getAny());
211         }
212         // CBuiltinLeafInfo: java.lang.String
213         this.identifier = ((o.identifier == null)?null:o.getIdentifier());
214         // CBuiltinLeafInfo: java.lang.String
215         this.name = ((o.name == null)?null:o.getName());
216         // CBuiltinLeafInfo: java.lang.String
217         this.clazz = ((o.clazz == null)?null:o.getClazz());
218         // CBuiltinLeafInfo: java.lang.String
219         this.location = ((o.location == null)?null:o.getLocation());
220         // CBuiltinLeafInfo: java.lang.String
221         this.vendor = ((o.vendor == null)?null:o.getVendor());
222         // CBuiltinLeafInfo: java.lang.String
223         this.version = ((o.version == null)?null:o.getVersion());
224         // CBuiltinLeafInfo: java.lang.Boolean
225         this._final = ((o._final == null)?null:o.isFinal());
226         // CBuiltinLeafInfo: java.lang.Boolean
227         this.stateless = ((o.stateless == null)?null:o.isStateless());
228         // CBuiltinLeafInfo: java.lang.Boolean
229         this._abstract = ((o._abstract == null)?null:o.isAbstract());
230         // CBuiltinLeafInfo: java.lang.Boolean
231         this.classDeclaration = ((o.classDeclaration == null)?null:o.isClassDeclaration());
232     }
233 
234     /**
235      * References to specifications implemented by this implementation or {@code null}.
236      * 
237      * @return
238      *     possible object is
239      *     {@link Specifications }
240      *     
241      */
242     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
243     public Specifications getSpecifications() {
244         return specifications;
245     }
246 
247     /**
248      * Sets the value of the specifications property.
249      * 
250      * @param value
251      *     allowed object is
252      *     {@link Specifications }
253      *     
254      */
255     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
256     public void setSpecifications(Specifications value) {
257         this.specifications = value;
258     }
259 
260     /**
261      * References to implementations this implementation inherits from or {@code null}.
262      * 
263      * @return
264      *     possible object is
265      *     {@link Implementations }
266      *     
267      */
268     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
269     public Implementations getImplementations() {
270         return implementations;
271     }
272 
273     /**
274      * Sets the value of the implementations property.
275      * 
276      * @param value
277      *     allowed object is
278      *     {@link Implementations }
279      *     
280      */
281     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
282     public void setImplementations(Implementations value) {
283         this.implementations = value;
284     }
285 
286     /**
287      * Dependencies of this implementation or {@code null}.
288      * 
289      * @return
290      *     possible object is
291      *     {@link Dependencies }
292      *     
293      */
294     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
295     public Dependencies getDependencies() {
296         return dependencies;
297     }
298 
299     /**
300      * Sets the value of the dependencies property.
301      * 
302      * @param value
303      *     allowed object is
304      *     {@link Dependencies }
305      *     
306      */
307     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
308     public void setDependencies(Dependencies value) {
309         this.dependencies = value;
310     }
311 
312     /**
313      * Properties of this implementation or {@code null}.
314      * 
315      * @return
316      *     possible object is
317      *     {@link Properties }
318      *     
319      */
320     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
321     public Properties getProperties() {
322         return properties;
323     }
324 
325     /**
326      * Sets the value of the properties property.
327      * 
328      * @param value
329      *     allowed object is
330      *     {@link Properties }
331      *     
332      */
333     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
334     public void setProperties(Properties value) {
335         this.properties = value;
336     }
337 
338     /**
339      * Messages of this implementation or {@code null}.
340      * 
341      * @return
342      *     possible object is
343      *     {@link Messages }
344      *     
345      */
346     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
347     public Messages getMessages() {
348         return messages;
349     }
350 
351     /**
352      * Sets the value of the messages property.
353      * 
354      * @param value
355      *     allowed object is
356      *     {@link Messages }
357      *     
358      */
359     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
360     public void setMessages(Messages value) {
361         this.messages = value;
362     }
363 
364     /**
365      * Gets the value of the any property.
366      * 
367      * <p>
368      * This accessor method returns a reference to the live list,
369      * not a snapshot. Therefore any modification you make to the
370      * returned list will be present inside the JAXB object.
371      * This is why there is not a <CODE>set</CODE> method for the any property.
372      * 
373      * <p>
374      * For example, to add a new item, do as follows:
375      * <pre>
376      *    getAny().add(newItem);
377      * </pre>
378      * 
379      * 
380      * <p>
381      * Objects of the following type(s) are allowed in the list
382      * {@link Object }
383      * {@link Element }
384      * 
385      * 
386      */
387     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
388     public List<Object> getAny() {
389         if (any == null) {
390             any = new ArrayList<Object>();
391         }
392         return this.any;
393     }
394 
395     /**
396      * The identifier of this implementation.
397      * 
398      * @return
399      *     possible object is
400      *     {@link String }
401      *     
402      */
403     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
404     public String getIdentifier() {
405         return identifier;
406     }
407 
408     /**
409      * Sets the value of the identifier property.
410      * 
411      * @param value
412      *     allowed object is
413      *     {@link String }
414      *     
415      */
416     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
417     public void setIdentifier(String value) {
418         this.identifier = value;
419     }
420 
421     /**
422      * The name of this implementation.
423      * 
424      * @return
425      *     possible object is
426      *     {@link String }
427      *     
428      */
429     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
430     public String getName() {
431         return name;
432     }
433 
434     /**
435      * Sets the value of the name property.
436      * 
437      * @param value
438      *     allowed object is
439      *     {@link String }
440      *     
441      */
442     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
443     public void setName(String value) {
444         this.name = value;
445     }
446 
447     /**
448      * The identifier of the class providing instances of this implementation or {@code null}.
449      * 
450      * @return
451      *     possible object is
452      *     {@link String }
453      *     
454      */
455     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
456     public String getClazz() {
457         return clazz;
458     }
459 
460     /**
461      * Sets the value of the clazz property.
462      * 
463      * @param value
464      *     allowed object is
465      *     {@link String }
466      *     
467      */
468     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
469     public void setClazz(String value) {
470         this.clazz = value;
471     }
472 
473     /**
474      * An URI of the location providing instances of this implementation or {@code null}.
475      * 
476      * @return
477      *     possible object is
478      *     {@link String }
479      *     
480      */
481     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
482     public String getLocation() {
483         return location;
484     }
485 
486     /**
487      * Sets the value of the location property.
488      * 
489      * @param value
490      *     allowed object is
491      *     {@link String }
492      *     
493      */
494     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
495     public void setLocation(String value) {
496         this.location = value;
497     }
498 
499     /**
500      * The vendor of this implementation or {@code null}.
501      * 
502      * @return
503      *     possible object is
504      *     {@link String }
505      *     
506      */
507     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
508     public String getVendor() {
509         return vendor;
510     }
511 
512     /**
513      * Sets the value of the vendor property.
514      * 
515      * @param value
516      *     allowed object is
517      *     {@link String }
518      *     
519      */
520     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
521     public void setVendor(String value) {
522         this.vendor = value;
523     }
524 
525     /**
526      * The version of this implementation or {@code null}.
527      * 
528      * @return
529      *     possible object is
530      *     {@link String }
531      *     
532      */
533     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
534     public String getVersion() {
535         return version;
536     }
537 
538     /**
539      * Sets the value of the version property.
540      * 
541      * @param value
542      *     allowed object is
543      *     {@link String }
544      *     
545      */
546     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
547     public void setVersion(String value) {
548         this.version = value;
549     }
550 
551     /**
552      * {@code true}, if this implementation is the final node in an inheritance hierarchy.
553      * 
554      * @return
555      *     possible object is
556      *     {@link Boolean }
557      *     
558      */
559     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
560     public boolean isFinal() {
561         if (_final == null) {
562             return false;
563         } else {
564             return _final;
565         }
566     }
567 
568     /**
569      * Sets the value of the final property.
570      * 
571      * @param value
572      *     allowed object is
573      *     {@link Boolean }
574      *     
575      */
576     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
577     public void setFinal(Boolean value) {
578         this._final = value;
579     }
580 
581     /**
582      * {@code true}, if instances of this implementation do not retain state across operations.
583      * 
584      * @return
585      *     possible object is
586      *     {@link Boolean }
587      *     
588      */
589     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
590     public boolean isStateless() {
591         if (stateless == null) {
592             return false;
593         } else {
594             return stateless;
595         }
596     }
597 
598     /**
599      * Sets the value of the stateless property.
600      * 
601      * @param value
602      *     allowed object is
603      *     {@link Boolean }
604      *     
605      */
606     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
607     public void setStateless(Boolean value) {
608         this.stateless = value;
609     }
610 
611     /**
612      * {@code true}, if this implementation is abstract.
613      * 
614      * @return
615      *     possible object is
616      *     {@link Boolean }
617      *     
618      */
619     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
620     public boolean isAbstract() {
621         if (_abstract == null) {
622             return false;
623         } else {
624             return _abstract;
625         }
626     }
627 
628     /**
629      * Sets the value of the abstract property.
630      * 
631      * @param value
632      *     allowed object is
633      *     {@link Boolean }
634      *     
635      */
636     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
637     public void setAbstract(Boolean value) {
638         this._abstract = value;
639     }
640 
641     /**
642      * {@code true}, if this implementation declares the class given by property {@code clazz}.
643      * 
644      * @return
645      *     possible object is
646      *     {@link Boolean }
647      *     
648      */
649     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
650     public boolean isClassDeclaration() {
651         if (classDeclaration == null) {
652             return false;
653         } else {
654             return classDeclaration;
655         }
656     }
657 
658     /**
659      * Sets the value of the classDeclaration property.
660      * 
661      * @param value
662      *     allowed object is
663      *     {@link Boolean }
664      *     
665      */
666     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
667     public void setClassDeclaration(Boolean value) {
668         this.classDeclaration = value;
669     }
670 
671     /**
672      * Copies all values of property {@code Any} deeply.
673      * 
674      * @param source
675      *     The source to copy from.
676      * @param target
677      *     The target to copy {@code source} to.
678      * @throws NullPointerException
679      *     if {@code target} is {@code null}.
680      */
681     @SuppressWarnings("unchecked")
682     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
683     private static void copyAny(final List<Object> source, final List<Object> target) {
684         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
685         if ((source!= null)&&(!source.isEmpty())) {
686             for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
687                 final Object next = it.next();
688                 if (next instanceof Element) {
689                     // CWildcardTypeInfo: org.w3c.dom.Element
690                     target.add(((Element)((Element) next).cloneNode(true)));
691                     continue;
692                 }
693                 if (next instanceof Object) {
694                     // CBuiltinLeafInfo: java.lang.Object
695                     target.add(copyOf(((Object) next)));
696                     continue;
697                 }
698                 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
699                 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Implementation'."));
700             }
701         }
702     }
703 
704     /**
705      * Creates and returns a deep copy of a given object.
706      * 
707      * @param o
708      *     The instance to copy or {@code null}.
709      * @return
710      *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
711      */
712     @SuppressWarnings("unchecked")
713     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
714     private static Object copyOf(final Object o) {
715         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
716         try {
717             if (o!= null) {
718                 if (o.getClass().isPrimitive()) {
719                     return o;
720                 }
721                 if (o.getClass().isArray()) {
722                     return copyOfArray(o);
723                 }
724                 // Immutable types.
725                 if (o instanceof Boolean) {
726                     return o;
727                 }
728                 if (o instanceof Byte) {
729                     return o;
730                 }
731                 if (o instanceof Character) {
732                     return o;
733                 }
734                 if (o instanceof Double) {
735                     return o;
736                 }
737                 if (o instanceof Enum) {
738                     return o;
739                 }
740                 if (o instanceof Float) {
741                     return o;
742                 }
743                 if (o instanceof Integer) {
744                     return o;
745                 }
746                 if (o instanceof Long) {
747                     return o;
748                 }
749                 if (o instanceof Short) {
750                     return o;
751                 }
752                 if (o instanceof String) {
753                     return o;
754                 }
755                 if (o instanceof BigDecimal) {
756                     return o;
757                 }
758                 if (o instanceof BigInteger) {
759                     return o;
760                 }
761                 if (o instanceof UUID) {
762                     return o;
763                 }
764                 if (o instanceof QName) {
765                     return o;
766                 }
767                 if (o instanceof Duration) {
768                     return o;
769                 }
770                 if (o instanceof Currency) {
771                     return o;
772                 }
773                 // String based types.
774                 if (o instanceof File) {
775                     return new File(o.toString());
776                 }
777                 if (o instanceof URI) {
778                     return new URI(o.toString());
779                 }
780                 if (o instanceof URL) {
781                     return new URL(o.toString());
782                 }
783                 if (o instanceof MimeType) {
784                     return new MimeType(o.toString());
785                 }
786                 // Cloneable types.
787                 if (o instanceof XMLGregorianCalendar) {
788                     return ((XMLGregorianCalendar) o).clone();
789                 }
790                 if (o instanceof Date) {
791                     return ((Date) o).clone();
792                 }
793                 if (o instanceof Calendar) {
794                     return ((Calendar) o).clone();
795                 }
796                 if (o instanceof TimeZone) {
797                     return ((TimeZone) o).clone();
798                 }
799                 if (o instanceof Locale) {
800                     return ((Locale) o).clone();
801                 }
802                 if (o instanceof Element) {
803                     return ((Element)((Element) o).cloneNode(true));
804                 }
805                 if (o instanceof JAXBElement) {
806                     return copyOf(((JAXBElement) o));
807                 }
808                 try {
809                     return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
810                 } catch (NoSuchMethodException e) {
811                     if (o instanceof Serializable) {
812                         return copyOf(((Serializable) o));
813                     }
814                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
815                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
816                 } catch (IllegalAccessException e) {
817                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
818                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
819                 } catch (InvocationTargetException e) {
820                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
821                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
822                 } catch (SecurityException e) {
823                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
824                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
825                 } catch (IllegalArgumentException e) {
826                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
827                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
828                 } catch (ExceptionInInitializerError e) {
829                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
830                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
831                 }
832             }
833             return null;
834         } catch (MimeTypeParseException e) {
835             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
836         } catch (URISyntaxException e) {
837             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
838         } catch (MalformedURLException e) {
839             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
840         }
841     }
842 
843     /**
844      * Creates and returns a deep copy of a given array.
845      * 
846      * @param array
847      *     The array to copy or {@code null}.
848      * @return
849      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
850      */
851     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
852     private static Object copyOfArray(final Object array) {
853         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
854         if (array!= null) {
855             if (array.getClass() == boolean[].class) {
856                 return copyOf(((boolean[]) array));
857             }
858             if (array.getClass() == byte[].class) {
859                 return copyOf(((byte[]) array));
860             }
861             if (array.getClass() == char[].class) {
862                 return copyOf(((char[]) array));
863             }
864             if (array.getClass() == double[].class) {
865                 return copyOf(((double[]) array));
866             }
867             if (array.getClass() == float[].class) {
868                 return copyOf(((float[]) array));
869             }
870             if (array.getClass() == int[].class) {
871                 return copyOf(((int[]) array));
872             }
873             if (array.getClass() == long[].class) {
874                 return copyOf(((long[]) array));
875             }
876             if (array.getClass() == short[].class) {
877                 return copyOf(((short[]) array));
878             }
879             final int len = Array.getLength(array);
880             final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
881             for (int i = (len- 1); (i >= 0); i--) {
882                 Array.set(copy, i, copyOf(Array.get(array, i)));
883             }
884             return copy;
885         }
886         return null;
887     }
888 
889     /**
890      * Creates and returns a deep copy of a given array.
891      * 
892      * @param array
893      *     The array to copy or {@code null}.
894      * @return
895      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
896      */
897     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
898     private static boolean[] copyOf(final boolean[] array) {
899         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
900         if (array!= null) {
901             final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
902             System.arraycopy(array, 0, copy, 0, array.length);
903             return copy;
904         }
905         return null;
906     }
907 
908     /**
909      * Creates and returns a deep copy of a given array.
910      * 
911      * @param array
912      *     The array to copy or {@code null}.
913      * @return
914      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
915      */
916     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
917     private static byte[] copyOf(final byte[] array) {
918         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
919         if (array!= null) {
920             final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
921             System.arraycopy(array, 0, copy, 0, array.length);
922             return copy;
923         }
924         return null;
925     }
926 
927     /**
928      * Creates and returns a deep copy of a given array.
929      * 
930      * @param array
931      *     The array to copy or {@code null}.
932      * @return
933      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
934      */
935     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
936     private static char[] copyOf(final char[] array) {
937         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
938         if (array!= null) {
939             final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
940             System.arraycopy(array, 0, copy, 0, array.length);
941             return copy;
942         }
943         return null;
944     }
945 
946     /**
947      * Creates and returns a deep copy of a given array.
948      * 
949      * @param array
950      *     The array to copy or {@code null}.
951      * @return
952      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
953      */
954     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
955     private static double[] copyOf(final double[] array) {
956         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
957         if (array!= null) {
958             final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
959             System.arraycopy(array, 0, copy, 0, array.length);
960             return copy;
961         }
962         return null;
963     }
964 
965     /**
966      * Creates and returns a deep copy of a given array.
967      * 
968      * @param array
969      *     The array to copy or {@code null}.
970      * @return
971      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
972      */
973     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
974     private static float[] copyOf(final float[] array) {
975         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
976         if (array!= null) {
977             final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
978             System.arraycopy(array, 0, copy, 0, array.length);
979             return copy;
980         }
981         return null;
982     }
983 
984     /**
985      * Creates and returns a deep copy of a given array.
986      * 
987      * @param array
988      *     The array to copy or {@code null}.
989      * @return
990      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
991      */
992     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
993     private static int[] copyOf(final int[] array) {
994         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
995         if (array!= null) {
996             final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
997             System.arraycopy(array, 0, copy, 0, array.length);
998             return copy;
999         }
1000         return null;
1001     }
1002 
1003     /**
1004      * Creates and returns a deep copy of a given array.
1005      * 
1006      * @param array
1007      *     The array to copy or {@code null}.
1008      * @return
1009      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
1010      */
1011     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1012     private static long[] copyOf(final long[] array) {
1013         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
1014         if (array!= null) {
1015             final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
1016             System.arraycopy(array, 0, copy, 0, array.length);
1017             return copy;
1018         }
1019         return null;
1020     }
1021 
1022     /**
1023      * Creates and returns a deep copy of a given array.
1024      * 
1025      * @param array
1026      *     The array to copy or {@code null}.
1027      * @return
1028      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
1029      */
1030     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1031     private static short[] copyOf(final short[] array) {
1032         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
1033         if (array!= null) {
1034             final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
1035             System.arraycopy(array, 0, copy, 0, array.length);
1036             return copy;
1037         }
1038         return null;
1039     }
1040 
1041     /**
1042      * Creates and returns a deep copy of a given {@code JAXBElement} instance.
1043      * 
1044      * @param element
1045      *     The instance to copy or {@code null}.
1046      * @return
1047      *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
1048      */
1049     @SuppressWarnings("unchecked")
1050     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1051     private static JAXBElement copyOf(final JAXBElement element) {
1052         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
1053         if (element!= null) {
1054             final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
1055             copy.setNil(element.isNil());
1056             copy.setValue(copyOf(copy.getValue()));
1057             return copy;
1058         }
1059         return null;
1060     }
1061 
1062     /**
1063      * Creates and returns a deep copy of a given {@code Serializable}.
1064      * 
1065      * @param serializable
1066      *     The instance to copy or {@code null}.
1067      * @return
1068      *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
1069      */
1070     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1071     private static Serializable copyOf(final Serializable serializable) {
1072         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
1073         if (serializable!= null) {
1074             try {
1075                 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
1076                 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
1077                 out.writeObject(serializable);
1078                 out.close();
1079                 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
1080                 final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
1081                 final Serializable copy = ((Serializable) in.readObject());
1082                 in.close();
1083                 return copy;
1084             } catch (SecurityException e) {
1085                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1086             } catch (ClassNotFoundException e) {
1087                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1088             } catch (InvalidClassException e) {
1089                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1090             } catch (NotSerializableException e) {
1091                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1092             } catch (StreamCorruptedException e) {
1093                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1094             } catch (OptionalDataException e) {
1095                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1096             } catch (IOException e) {
1097                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1098             }
1099         }
1100         return null;
1101     }
1102 
1103     /**
1104      * Creates and returns a deep copy of this object.
1105      * 
1106      * 
1107      * @return
1108      *     A deep copy of this object.
1109      */
1110     @Override
1111     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
1112     public Implementation clone() {
1113         {
1114             // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
1115             final Implementation clone = ((Implementation) super.clone());
1116             // CClassInfo: org.jomc.model.Specifications
1117             clone.specifications = ((this.specifications == null)?null:((this.getSpecifications() == null)?null:this.getSpecifications().clone()));
1118             // CClassInfo: org.jomc.model.Implementations
1119             clone.implementations = ((this.implementations == null)?null:((this.getImplementations() == null)?null:this.getImplementations().clone()));
1120             // CClassInfo: org.jomc.model.Dependencies
1121             clone.dependencies = ((this.dependencies == null)?null:((this.getDependencies() == null)?null:this.getDependencies().clone()));
1122             // CClassInfo: org.jomc.model.Properties
1123             clone.properties = ((this.properties == null)?null:((this.getProperties() == null)?null:this.getProperties().clone()));
1124             // CClassInfo: org.jomc.model.Messages
1125             clone.messages = ((this.messages == null)?null:((this.getMessages() == null)?null:this.getMessages().clone()));
1126             // 'Any' collection.
1127             if (this.any!= null) {
1128                 clone.any = null;
1129                 copyAny(this.getAny(), clone.getAny());
1130             }
1131             // CBuiltinLeafInfo: java.lang.String
1132             clone.identifier = ((this.identifier == null)?null:this.getIdentifier());
1133             // CBuiltinLeafInfo: java.lang.String
1134             clone.name = ((this.name == null)?null:this.getName());
1135             // CBuiltinLeafInfo: java.lang.String
1136             clone.clazz = ((this.clazz == null)?null:this.getClazz());
1137             // CBuiltinLeafInfo: java.lang.String
1138             clone.location = ((this.location == null)?null:this.getLocation());
1139             // CBuiltinLeafInfo: java.lang.String
1140             clone.vendor = ((this.vendor == null)?null:this.getVendor());
1141             // CBuiltinLeafInfo: java.lang.String
1142             clone.version = ((this.version == null)?null:this.getVersion());
1143             // CBuiltinLeafInfo: java.lang.Boolean
1144             clone._final = ((this._final == null)?null:this.isFinal());
1145             // CBuiltinLeafInfo: java.lang.Boolean
1146             clone.stateless = ((this.stateless == null)?null:this.isStateless());
1147             // CBuiltinLeafInfo: java.lang.Boolean
1148             clone._abstract = ((this._abstract == null)?null:this.isAbstract());
1149             // CBuiltinLeafInfo: java.lang.Boolean
1150             clone.classDeclaration = ((this.classDeclaration == null)?null:this.isClassDeclaration());
1151             return clone;
1152         }
1153     }
1154     
1155     /**
1156      * Gets the Java class of the type referenced by the implementation for a given class loader.
1157      *
1158      * @param classLoader The class loader to get the Java class from or {@code null}, to get the Java class from the
1159      * platform's bootstrap class loader.
1160      *
1161      * @return The Java class of the type referenced by the implementation or {@code null}, if the implementation does
1162      * not reference a type.
1163      *
1164      * @throws ClassNotFoundException if the Java class is not found.
1165      * @throws ModelObjectException if compiling the name of the referenced type to a {@code JavaTypeName} fails.
1166      *
1167      * @see #getClazz()
1168      * @see #getJavaTypeName()
1169      *
1170      * @since 1.2
1171      */
1172     public Class<?> getJavaClass( final ClassLoader classLoader )
1173         throws ClassNotFoundException, ModelObjectException
1174     {
1175         Class<?> javaClass = null;
1176         final JavaTypeName javaTypeName = this.getJavaTypeName();
1177 
1178         if ( javaTypeName != null )
1179         {
1180             javaClass = javaTypeName.getClass( classLoader, false );
1181         }
1182 
1183         return javaClass;
1184     }
1185 
1186     /**
1187      * Gets the Java type name of the type referenced by the implementation.
1188      *
1189      * @return The Java type name of the type referenced by the implementation or {@code null}, if the implementation
1190      * does not reference a type.
1191      *
1192      * @throws ModelObjectException if compiling the name of the referenced type to a {@code JavaTypeName} fails.
1193      *
1194      * @see #getClazz()
1195      *
1196      * @since 1.4
1197      */
1198     public JavaTypeName getJavaTypeName() throws ModelObjectException
1199     {
1200         try
1201         {
1202             JavaTypeName javaTypeName = null;
1203 
1204             if ( this.getClazz() != null )
1205             {
1206                 javaTypeName = JavaTypeName.parse( this.getClazz() );
1207             }
1208 
1209             return javaTypeName;
1210         }
1211         catch ( final java.text.ParseException e )
1212         {
1213             throw new ModelObjectException( getMessage( "javaTypeNameParseException", this.getClazz(),
1214                                                         getMessage( e ) ), e );
1215 
1216         }
1217     }
1218 
1219     /**
1220      * Gets the location URI used for locating instances of this implementation.
1221      *
1222      * @return The location URI used for locating instances of this implementation or {@code null}, if instances of this
1223      * implementation do not need to be located.
1224      *
1225      * @throws ModelObjectException if compiling the location to an {@code URI} object fails.
1226      *
1227      * @see #getLocation()
1228      */
1229     public java.net.URI getLocationUri() throws ModelObjectException
1230     {
1231         try
1232         {
1233             java.net.URI javaLocation = null;
1234 
1235             if ( this.getLocation() != null )
1236             {
1237                 javaLocation = new java.net.URI( this.getLocation() );
1238             }
1239 
1240             return javaLocation;
1241         }
1242         catch ( final java.net.URISyntaxException e )
1243         {
1244             throw new ModelObjectException( getMessage( "uriSyntaxException", this.getLocation(),
1245                                                         getMessage( e ) ), e );
1246 
1247         }
1248     }
1249 
1250     /**
1251      * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
1252      * instance.
1253      *
1254      * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
1255      * @param localPart The local part of the {@code JAXBElement} to return.
1256      *
1257      * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
1258      * of the instance or {@code null}, if no such element is found.
1259      *
1260      * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}.
1261      * @throws IllegalStateException if the {@code any} property contains more than one matching element.
1262      *
1263      * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String)
1264      *
1265      * @deprecated As of JOMC 1.1, please use method {@link #getAnyElement(java.lang.String, java.lang.String, java.lang.Class)}.
1266      * This method will be removed in version 2.0.
1267      */
1268     @Deprecated
1269     public javax.xml.bind.JAXBElement getAnyElement( final String namespaceURI, final String localPart )
1270     {
1271         return this.getAnyElement( this.getAny(), namespaceURI, localPart );
1272     }
1273 
1274     /**
1275      * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
1276      * property of the instance.
1277      *
1278      * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
1279      * @param localPart The local part of the {@code JAXBElement}s to return.
1280      *
1281      * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
1282      * the {@code any} property of the instance - an empty list if no such elements are found.
1283      *
1284      * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}.
1285      *
1286      * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String)
1287      *
1288      * @deprecated As of JOMC 1.1, please use method {@link #getAnyElements(java.lang.String, java.lang.String, java.lang.Class)}.
1289      * This method will be removed in version 2.0.
1290      */
1291     @Deprecated
1292     public java.util.List<javax.xml.bind.JAXBElement> getAnyElements( final String namespaceURI,
1293                                                                       final String localPart )
1294     {
1295         return this.getAnyElements( this.getAny(), namespaceURI, localPart );
1296     }
1297 
1298     /**
1299      * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
1300      * instance.
1301      *
1302      * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
1303      * @param localPart The local part of the {@code JAXBElement} to return.
1304      * @param type The class of the type the element is bound to.
1305      * @param <T> The type the element is bound to.
1306      *
1307      * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
1308      * of the instance or {@code null}, if no such element is found.
1309      *
1310      * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
1311      * @throws IllegalStateException if the {@code any} property contains more than one matching element.
1312      *
1313      * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
1314      *
1315      * @since 1.1
1316      */
1317     public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
1318                                                             final Class<T> type )
1319     {
1320         return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
1321     }
1322 
1323     /**
1324      * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
1325      * property of the instance.
1326      *
1327      * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
1328      * @param localPart The local part of the {@code JAXBElement}s to return.
1329      * @param type The class of the type the elements are bound to.
1330      * @param <T> The type the elements are bound to.
1331      *
1332      * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
1333      * the {@code any} property of the instance - an empty list if no such elements are found.
1334      *
1335      * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
1336      *
1337      * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
1338      *
1339      * @since 1.1
1340      */
1341     public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
1342                                                                              final String localPart,
1343                                                                              final Class<T> type )
1344     {
1345         return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
1346     }
1347 
1348     /**
1349      * Gets a single object matching a given class from the {@code any} property of the instance.
1350      *
1351      * @param clazz The class to return an instance of.
1352      * @param <T> The type of the object to return.
1353      *
1354      * @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such
1355      * instance is found.
1356      *
1357      * @throws NullPointerException if {@code clazz} is {@code null}.
1358      * @throws IllegalStateException if the {@code any} property contains more than one matching object.
1359      *
1360      * @see #getAnyObject(java.util.List, java.lang.Class)
1361      */
1362     public <T> T getAnyObject( final Class<T> clazz )
1363     {
1364         return this.getAnyObject( this.getAny(), clazz );
1365     }
1366 
1367     /**
1368      * Gets a list containing all objects matching a given class from the {@code any} property of the instance.
1369      *
1370      * @param clazz The class to return all instances of.
1371      * @param <T> The type of the objects to return.
1372      *
1373      * @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance -
1374      * an empty list if no such objects are found.
1375      *
1376      * @throws NullPointerException if {@code clazz} is {@code null}.
1377      *
1378      * @see #getAnyObjects(java.util.List, java.lang.Class)
1379      */
1380     public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
1381     {
1382         return this.getAnyObjects( this.getAny(), clazz );
1383     }
1384 
1385     private static String getMessage( final Throwable t )
1386     {
1387         return t != null
1388                ? t.getMessage() != null && t.getMessage().trim().length() > 0
1389                  ? t.getMessage()
1390                  : getMessage( t.getCause() )
1391                : null;
1392 
1393     }
1394 
1395     private static String getMessage( final String key, final Object... arguments )
1396     {
1397         return java.text.MessageFormat.format( java.util.ResourceBundle.getBundle(
1398             Implementation.class.getName().replace( '.', '/' ), java.util.Locale.getDefault() ).
1399             getString( key ), arguments );
1400 
1401     }
1402       
1403 }