--- old/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElementDecl.java 2015-01-29 16:25:06.021677340 +0300 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElementDecl.java 2015-01-29 16:25:05.957677342 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,23 +62,23 @@ * @XmlRegistry * class ObjectFactory { * @XmlElementDecl(name="foo") - * JAXBElement<String> createFoo(String s) { ... } + * JAXBElement<String> createFoo(String s) { ... } * } * *
- * <!-- XML input --> - * <foo>string + * <!-- XML input --> + * <foo>string</foo> * * // Example: code fragment corresponding to XML input - * JAXBElement* *o = - * (JAXBElement )unmarshaller.unmarshal(aboveDocument); + * JAXBElement<String> o = + * (JAXBElement<String>)unmarshaller.unmarshal(aboveDocument); * // print JAXBElement instance to show values * System.out.println(o.getName()); // prints "{}foo" * System.out.println(o.getValue()); // prints "string" * System.out.println(o.getValue().getClass()); // prints "java.lang.String" * - * <!-- Example: XML schema definition --> - * <xs:element name="foo" type="xs:string"/> + * <!-- Example: XML schema definition --> + * <xs:element name="foo" type="xs:string"/> *
Example 2: Element declaration with non local scope @@ -91,16 +91,16 @@ * this javadoc. * *
- * <!-- Example: XML schema definition --> - * <xs:schema> - * <xs:complexType name="pea"> - * <xs:choice maxOccurs="unbounded"> - * <xs:element name="foo" type="xs:string"/> - * <xs:element name="bar" type="xs:string"/> - * </xs:choice> - * </xs:complexType> - * <xs:element name="foo" type="xs:int"/> - * </xs:schema> + * <!-- Example: XML schema definition --> + * <xs:schema> + * <xs:complexType name="pea"> + * <xs:choice maxOccurs="unbounded"> + * <xs:element name="foo" type="xs:string"/> + * <xs:element name="bar" type="xs:string"/> + * </xs:choice> + * </xs:complexType> + * <xs:element name="foo" type="xs:int"/> + * </xs:schema> **
* // Example: expected default binding @@ -109,19 +109,19 @@ * @XmlElementRef(name="foo",type=JAXBElement.class) * @XmlElementRef(name="bar",type=JAXBElement.class) * }) - * List<JAXBElement<String>> fooOrBar; + * List<JAXBElement<String>> fooOrBar; * } * * @XmlRegistry * class ObjectFactory { * @XmlElementDecl(scope=Pea.class,name="foo") - * JAXBElementcreatePeaFoo(String s); + * JAXBElement<String> createPeaFoo(String s); * * @XmlElementDecl(scope=Pea.class,name="bar") - * JAXBElement createPeaBar(String s); + * JAXBElement<String> createPeaBar(String s); * * @XmlElementDecl(name="foo") - * JAXBElement createFoo(Integer i); + * JAXBElement<Integer> createFoo(Integer i); * } * *