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