001// 002// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 003// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 004// Any modifications to this file will be lost upon recompilation of the source schema. 005// Generated on: 2016.11.01 at 03:16:38 AM CET 006// 007 008 009package org.jomc.model; 010 011import java.io.ByteArrayInputStream; 012import java.io.ByteArrayOutputStream; 013import java.io.File; 014import java.io.IOException; 015import java.io.InvalidClassException; 016import java.io.NotSerializableException; 017import java.io.ObjectInputStream; 018import java.io.ObjectOutputStream; 019import java.io.OptionalDataException; 020import java.io.Serializable; 021import java.io.StreamCorruptedException; 022import java.lang.reflect.Array; 023import java.lang.reflect.InvocationTargetException; 024import java.math.BigDecimal; 025import java.math.BigInteger; 026import java.net.MalformedURLException; 027import java.net.URI; 028import java.net.URISyntaxException; 029import java.net.URL; 030import java.util.ArrayList; 031import java.util.Calendar; 032import java.util.Currency; 033import java.util.Date; 034import java.util.Iterator; 035import java.util.List; 036import java.util.Locale; 037import java.util.TimeZone; 038import java.util.UUID; 039import javax.activation.MimeType; 040import javax.activation.MimeTypeParseException; 041import javax.annotation.Generated; 042import javax.xml.bind.JAXBElement; 043import javax.xml.bind.annotation.XmlAccessType; 044import javax.xml.bind.annotation.XmlAccessorType; 045import javax.xml.bind.annotation.XmlAnyElement; 046import javax.xml.bind.annotation.XmlAttribute; 047import javax.xml.bind.annotation.XmlSeeAlso; 048import javax.xml.bind.annotation.XmlType; 049import javax.xml.datatype.Duration; 050import javax.xml.datatype.XMLGregorianCalendar; 051import javax.xml.namespace.QName; 052import org.w3c.dom.Element; 053 054 055/** 056 * 057 * Model of a person. 058 * 059 * The 'Person' type defines attributes 'name' and 'mail'. Attribute 'name' holds the name of a person. Attribute 'mail' 060 * holds the mail address of a person. 061 * 062 * 063 * <p>Java class for Person complex type. 064 * 065 * <p>The following schema fragment specifies the expected content contained within this class. 066 * 067 * <pre> 068 * <complexType name="Person"> 069 * <complexContent> 070 * <extension base="{http://jomc.org/model}ModelObject"> 071 * <sequence> 072 * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> 073 * </sequence> 074 * <attribute name="name" use="required" type="{http://jomc.org/model}String" /> 075 * <attribute name="mail" type="{http://jomc.org/model}String" /> 076 * </extension> 077 * </complexContent> 078 * </complexType> 079 * </pre> 080 * 081 * 082 */ 083@XmlAccessorType(XmlAccessType.FIELD) 084@XmlType(name = "Person", namespace = "http://jomc.org/model", propOrder = { 085 "any" 086}) 087@XmlSeeAlso({ 088 Author.class 089}) 090@Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 091public class Person 092 extends ModelObject 093 implements Cloneable 094{ 095 096 @XmlAnyElement(lax = true) 097 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 098 protected List<Object> any; 099 @XmlAttribute(name = "name", required = true) 100 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 101 protected String name; 102 @XmlAttribute(name = "mail") 103 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 104 protected String mail; 105 106 /** 107 * Creates a new {@code Person} instance. 108 * 109 */ 110 public Person() { 111 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 112 super(); 113 } 114 115 /** 116 * Creates a new {@code Person} instance by deeply copying a given {@code Person} instance. 117 * 118 * 119 * @param o 120 * The instance to copy. 121 * @throws NullPointerException 122 * if {@code o} is {@code null}. 123 */ 124 public Person(final Person o) { 125 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 126 super(o); 127 if (o == null) { 128 throw new NullPointerException("Cannot create a copy of 'Person' from 'null'."); 129 } 130 // 'Any' collection. 131 if (o.any!= null) { 132 copyAny(o.getAny(), this.getAny()); 133 } 134 // CBuiltinLeafInfo: java.lang.String 135 this.name = ((o.name == null)?null:o.getName()); 136 // CBuiltinLeafInfo: java.lang.String 137 this.mail = ((o.mail == null)?null:o.getMail()); 138 } 139 140 /** 141 * Gets the value of the any property. 142 * 143 * <p> 144 * This accessor method returns a reference to the live list, 145 * not a snapshot. Therefore any modification you make to the 146 * returned list will be present inside the JAXB object. 147 * This is why there is not a <CODE>set</CODE> method for the any property. 148 * 149 * <p> 150 * For example, to add a new item, do as follows: 151 * <pre> 152 * getAny().add(newItem); 153 * </pre> 154 * 155 * 156 * <p> 157 * Objects of the following type(s) are allowed in the list 158 * {@link Object } 159 * {@link Element } 160 * 161 * 162 */ 163 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 164 public List<Object> getAny() { 165 if (any == null) { 166 any = new ArrayList<Object>(); 167 } 168 return this.any; 169 } 170 171 /** 172 * Name of this person. 173 * 174 * @return 175 * possible object is 176 * {@link String } 177 * 178 */ 179 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 180 public String getName() { 181 return name; 182 } 183 184 /** 185 * Sets the value of the name property. 186 * 187 * @param value 188 * allowed object is 189 * {@link String } 190 * 191 */ 192 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 193 public void setName(String value) { 194 this.name = value; 195 } 196 197 /** 198 * Mail address of this person or {@code null}. 199 * 200 * @return 201 * possible object is 202 * {@link String } 203 * 204 */ 205 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 206 public String getMail() { 207 return mail; 208 } 209 210 /** 211 * Sets the value of the mail property. 212 * 213 * @param value 214 * allowed object is 215 * {@link String } 216 * 217 */ 218 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 219 public void setMail(String value) { 220 this.mail = value; 221 } 222 223 /** 224 * Copies all values of property {@code Any} deeply. 225 * 226 * @param source 227 * The source to copy from. 228 * @param target 229 * The target to copy {@code source} to. 230 * @throws NullPointerException 231 * if {@code target} is {@code null}. 232 */ 233 @SuppressWarnings("unchecked") 234 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 235 private static void copyAny(final List<Object> source, final List<Object> target) { 236 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 237 if ((source!= null)&&(!source.isEmpty())) { 238 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) { 239 final Object next = it.next(); 240 if (next instanceof Element) { 241 // CWildcardTypeInfo: org.w3c.dom.Element 242 target.add(((Element)((Element) next).cloneNode(true))); 243 continue; 244 } 245 if (next instanceof Object) { 246 // CBuiltinLeafInfo: java.lang.Object 247 target.add(copyOf(((Object) next))); 248 continue; 249 } 250 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 251 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Person'.")); 252 } 253 } 254 } 255 256 /** 257 * Creates and returns a deep copy of a given object. 258 * 259 * @param o 260 * The instance to copy or {@code null}. 261 * @return 262 * A deep copy of {@code o} or {@code null} if {@code o} is {@code null}. 263 */ 264 @SuppressWarnings("unchecked") 265 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 266 private static Object copyOf(final Object o) { 267 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 268 try { 269 if (o!= null) { 270 if (o.getClass().isPrimitive()) { 271 return o; 272 } 273 if (o.getClass().isArray()) { 274 return copyOfArray(o); 275 } 276 // Immutable types. 277 if (o instanceof Boolean) { 278 return o; 279 } 280 if (o instanceof Byte) { 281 return o; 282 } 283 if (o instanceof Character) { 284 return o; 285 } 286 if (o instanceof Double) { 287 return o; 288 } 289 if (o instanceof Enum) { 290 return o; 291 } 292 if (o instanceof Float) { 293 return o; 294 } 295 if (o instanceof Integer) { 296 return o; 297 } 298 if (o instanceof Long) { 299 return o; 300 } 301 if (o instanceof Short) { 302 return o; 303 } 304 if (o instanceof String) { 305 return o; 306 } 307 if (o instanceof BigDecimal) { 308 return o; 309 } 310 if (o instanceof BigInteger) { 311 return o; 312 } 313 if (o instanceof UUID) { 314 return o; 315 } 316 if (o instanceof QName) { 317 return o; 318 } 319 if (o instanceof Duration) { 320 return o; 321 } 322 if (o instanceof Currency) { 323 return o; 324 } 325 // String based types. 326 if (o instanceof File) { 327 return new File(o.toString()); 328 } 329 if (o instanceof URI) { 330 return new URI(o.toString()); 331 } 332 if (o instanceof URL) { 333 return new URL(o.toString()); 334 } 335 if (o instanceof MimeType) { 336 return new MimeType(o.toString()); 337 } 338 // Cloneable types. 339 if (o instanceof XMLGregorianCalendar) { 340 return ((XMLGregorianCalendar) o).clone(); 341 } 342 if (o instanceof Date) { 343 return ((Date) o).clone(); 344 } 345 if (o instanceof Calendar) { 346 return ((Calendar) o).clone(); 347 } 348 if (o instanceof TimeZone) { 349 return ((TimeZone) o).clone(); 350 } 351 if (o instanceof Locale) { 352 return ((Locale) o).clone(); 353 } 354 if (o instanceof Element) { 355 return ((Element)((Element) o).cloneNode(true)); 356 } 357 if (o instanceof JAXBElement) { 358 return copyOf(((JAXBElement) o)); 359 } 360 try { 361 return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null)); 362 } catch (NoSuchMethodException e) { 363 if (o instanceof Serializable) { 364 return copyOf(((Serializable) o)); 365 } 366 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 367 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 368 } catch (IllegalAccessException e) { 369 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 370 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 371 } catch (InvocationTargetException e) { 372 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 373 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 374 } catch (SecurityException e) { 375 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 376 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 377 } catch (IllegalArgumentException e) { 378 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 379 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 380 } catch (ExceptionInInitializerError e) { 381 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ 382 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 383 } 384 } 385 return null; 386 } catch (MalformedURLException e) { 387 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 388 } catch (MimeTypeParseException e) { 389 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 390 } catch (URISyntaxException e) { 391 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); 392 } 393 } 394 395 /** 396 * Creates and returns a deep copy of a given array. 397 * 398 * @param array 399 * The array to copy or {@code null}. 400 * @return 401 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 402 */ 403 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 404 private static Object copyOfArray(final Object array) { 405 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 406 if (array!= null) { 407 if (array.getClass() == boolean[].class) { 408 return copyOf(((boolean[]) array)); 409 } 410 if (array.getClass() == byte[].class) { 411 return copyOf(((byte[]) array)); 412 } 413 if (array.getClass() == char[].class) { 414 return copyOf(((char[]) array)); 415 } 416 if (array.getClass() == double[].class) { 417 return copyOf(((double[]) array)); 418 } 419 if (array.getClass() == float[].class) { 420 return copyOf(((float[]) array)); 421 } 422 if (array.getClass() == int[].class) { 423 return copyOf(((int[]) array)); 424 } 425 if (array.getClass() == long[].class) { 426 return copyOf(((long[]) array)); 427 } 428 if (array.getClass() == short[].class) { 429 return copyOf(((short[]) array)); 430 } 431 final int len = Array.getLength(array); 432 final Object copy = Array.newInstance(array.getClass().getComponentType(), len); 433 for (int i = (len- 1); (i >= 0); i--) { 434 Array.set(copy, i, copyOf(Array.get(array, i))); 435 } 436 return copy; 437 } 438 return null; 439 } 440 441 /** 442 * Creates and returns a deep copy of a given array. 443 * 444 * @param array 445 * The array to copy or {@code null}. 446 * @return 447 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 448 */ 449 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 450 private static boolean[] copyOf(final boolean[] array) { 451 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 452 if (array!= null) { 453 final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 454 System.arraycopy(array, 0, copy, 0, array.length); 455 return copy; 456 } 457 return null; 458 } 459 460 /** 461 * Creates and returns a deep copy of a given array. 462 * 463 * @param array 464 * The array to copy or {@code null}. 465 * @return 466 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 467 */ 468 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 469 private static byte[] copyOf(final byte[] array) { 470 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 471 if (array!= null) { 472 final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 473 System.arraycopy(array, 0, copy, 0, array.length); 474 return copy; 475 } 476 return null; 477 } 478 479 /** 480 * Creates and returns a deep copy of a given array. 481 * 482 * @param array 483 * The array to copy or {@code null}. 484 * @return 485 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 486 */ 487 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 488 private static char[] copyOf(final char[] array) { 489 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 490 if (array!= null) { 491 final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 492 System.arraycopy(array, 0, copy, 0, array.length); 493 return copy; 494 } 495 return null; 496 } 497 498 /** 499 * Creates and returns a deep copy of a given array. 500 * 501 * @param array 502 * The array to copy or {@code null}. 503 * @return 504 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 505 */ 506 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 507 private static double[] copyOf(final double[] array) { 508 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 509 if (array!= null) { 510 final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 511 System.arraycopy(array, 0, copy, 0, array.length); 512 return copy; 513 } 514 return null; 515 } 516 517 /** 518 * Creates and returns a deep copy of a given array. 519 * 520 * @param array 521 * The array to copy or {@code null}. 522 * @return 523 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 524 */ 525 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 526 private static float[] copyOf(final float[] array) { 527 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 528 if (array!= null) { 529 final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 530 System.arraycopy(array, 0, copy, 0, array.length); 531 return copy; 532 } 533 return null; 534 } 535 536 /** 537 * Creates and returns a deep copy of a given array. 538 * 539 * @param array 540 * The array to copy or {@code null}. 541 * @return 542 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 543 */ 544 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 545 private static int[] copyOf(final int[] array) { 546 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 547 if (array!= null) { 548 final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 549 System.arraycopy(array, 0, copy, 0, array.length); 550 return copy; 551 } 552 return null; 553 } 554 555 /** 556 * Creates and returns a deep copy of a given array. 557 * 558 * @param array 559 * The array to copy or {@code null}. 560 * @return 561 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 562 */ 563 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 564 private static long[] copyOf(final long[] array) { 565 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 566 if (array!= null) { 567 final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 568 System.arraycopy(array, 0, copy, 0, array.length); 569 return copy; 570 } 571 return null; 572 } 573 574 /** 575 * Creates and returns a deep copy of a given array. 576 * 577 * @param array 578 * The array to copy or {@code null}. 579 * @return 580 * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. 581 */ 582 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 583 private static short[] copyOf(final short[] array) { 584 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 585 if (array!= null) { 586 final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length)); 587 System.arraycopy(array, 0, copy, 0, array.length); 588 return copy; 589 } 590 return null; 591 } 592 593 /** 594 * Creates and returns a deep copy of a given {@code JAXBElement} instance. 595 * 596 * @param element 597 * The instance to copy or {@code null}. 598 * @return 599 * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. 600 */ 601 @SuppressWarnings("unchecked") 602 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 603 private static JAXBElement copyOf(final JAXBElement element) { 604 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 605 if (element!= null) { 606 final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); 607 copy.setNil(element.isNil()); 608 copy.setValue(copyOf(copy.getValue())); 609 return copy; 610 } 611 return null; 612 } 613 614 /** 615 * Creates and returns a deep copy of a given {@code Serializable}. 616 * 617 * @param serializable 618 * The instance to copy or {@code null}. 619 * @return 620 * A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}. 621 */ 622 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 623 private static Serializable copyOf(final Serializable serializable) { 624 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 625 if (serializable!= null) { 626 try { 627 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream(); 628 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput); 629 out.writeObject(serializable); 630 out.close(); 631 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray()); 632 final ObjectInputStream in = new ObjectInputStream(byteArrayInput); 633 final Serializable copy = ((Serializable) in.readObject()); 634 in.close(); 635 return copy; 636 } catch (SecurityException e) { 637 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 638 } catch (ClassNotFoundException e) { 639 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 640 } catch (InvalidClassException e) { 641 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 642 } catch (NotSerializableException e) { 643 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 644 } catch (StreamCorruptedException e) { 645 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 646 } catch (OptionalDataException e) { 647 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 648 } catch (IOException e) { 649 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); 650 } 651 } 652 return null; 653 } 654 655 /** 656 * Creates and returns a deep copy of this object. 657 * 658 * 659 * @return 660 * A deep copy of this object. 661 */ 662 @Override 663 @Generated(value = "com.sun.tools.xjc.Driver", date = "2016-11-01T03:16:37+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") 664 public Person clone() { 665 { 666 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 667 final Person clone = ((Person) super.clone()); 668 // 'Any' collection. 669 if (this.any!= null) { 670 clone.any = null; 671 copyAny(this.getAny(), clone.getAny()); 672 } 673 // CBuiltinLeafInfo: java.lang.String 674 clone.name = ((this.name == null)?null:this.getName()); 675 // CBuiltinLeafInfo: java.lang.String 676 clone.mail = ((this.mail == null)?null:this.getMail()); 677 return clone; 678 } 679 } 680 681 /** 682 * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the 683 * instance. 684 * 685 * @param namespaceURI The namespace URI of the {@code JAXBElement} to return. 686 * @param localPart The local part of the {@code JAXBElement} to return. 687 * 688 * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property 689 * of the instance or {@code null}, if no such element is found. 690 * 691 * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}. 692 * @throws IllegalStateException if the {@code any} property contains more than one matching element. 693 * 694 * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String) 695 * 696 * @deprecated As of JOMC 1.1, please use method {@link #getAnyElement(java.lang.String, java.lang.String, java.lang.Class)}. 697 * This method will be removed in version 2.0. 698 */ 699 @Deprecated 700 public javax.xml.bind.JAXBElement getAnyElement( final String namespaceURI, final String localPart ) 701 { 702 return this.getAnyElement( this.getAny(), namespaceURI, localPart ); 703 } 704 705 /** 706 * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any} 707 * property of the instance. 708 * 709 * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return. 710 * @param localPart The local part of the {@code JAXBElement}s to return. 711 * 712 * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from 713 * the {@code any} property of the instance - an empty list if no such elements are found. 714 * 715 * @throws NullPointerException if {@code namespaceURI} or {@code localPart} is {@code null}. 716 * 717 * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String) 718 * 719 * @deprecated As of JOMC 1.1, please use method {@link #getAnyElements(java.lang.String, java.lang.String, java.lang.Class)}. 720 * This method will be removed in version 2.0. 721 */ 722 @Deprecated 723 public java.util.List<javax.xml.bind.JAXBElement> getAnyElements( final String namespaceURI, 724 final String localPart ) 725 { 726 return this.getAnyElements( this.getAny(), namespaceURI, localPart ); 727 } 728 729 /** 730 * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the 731 * instance. 732 * 733 * @param namespaceURI The namespace URI of the {@code JAXBElement} to return. 734 * @param localPart The local part of the {@code JAXBElement} to return. 735 * @param type The class of the type the element is bound to. 736 * @param <T> The type the element is bound to. 737 * 738 * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property 739 * of the instance or {@code null}, if no such element is found. 740 * 741 * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}. 742 * @throws IllegalStateException if the {@code any} property contains more than one matching element. 743 * 744 * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class) 745 * 746 * @since 1.1 747 */ 748 public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart, 749 final Class<T> type ) 750 { 751 return this.getAnyElement( this.getAny(), namespaceURI, localPart, type ); 752 } 753 754 /** 755 * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any} 756 * property of the instance. 757 * 758 * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return. 759 * @param localPart The local part of the {@code JAXBElement}s to return. 760 * @param type The class of the type the elements are bound to. 761 * @param <T> The type the elements are bound to. 762 * 763 * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from 764 * the {@code any} property of the instance - an empty list if no such elements are found. 765 * 766 * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}. 767 * 768 * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class) 769 * 770 * @since 1.1 771 */ 772 public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI, 773 final String localPart, 774 final Class<T> type ) 775 { 776 return this.getAnyElements( this.getAny(), namespaceURI, localPart, type ); 777 } 778 779 /** 780 * Gets a single object matching a given class from the {@code any} property of the instance. 781 * 782 * @param clazz The class to return an instance of. 783 * @param <T> The type of the object to return. 784 * 785 * @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such 786 * instance is found. 787 * 788 * @throws NullPointerException if {@code clazz} is {@code null}. 789 * @throws IllegalStateException if the {@code any} property contains more than one matching object. 790 * 791 * @see #getAnyObject(java.util.List, java.lang.Class) 792 */ 793 public <T> T getAnyObject( final Class<T> clazz ) 794 { 795 return this.getAnyObject( this.getAny(), clazz ); 796 } 797 798 /** 799 * Gets a list containing all objects matching a given class from the {@code any} property of the instance. 800 * 801 * @param clazz The class to return all instances of. 802 * @param <T> The type of the objects to return. 803 * 804 * @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance - 805 * an empty list if no such objects are found. 806 * 807 * @throws NullPointerException if {@code clazz} is {@code null}. 808 * 809 * @see #getAnyObjects(java.util.List, java.lang.Class) 810 */ 811 public <T> java.util.List<T> getAnyObjects( final Class<T> clazz ) 812 { 813 return this.getAnyObjects( this.getAny(), clazz ); 814 } 815 816}