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