--- old/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlAttribute.java 2015-01-29 16:25:05.413677352 +0300 +++ new/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlAttribute.java 2015-01-29 16:25:05.349677354 +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 @@ -56,8 +56,8 @@ * simple type. *
* // Examples - * @XmlAttribute List<Integer> items; //legal - * @XmlAttribute List<Bar> foo; // illegal if Bar does not map to a schema simple type + * @XmlAttribute List<Integer> items; //legal + * @XmlAttribute List<Bar> foo; // illegal if Bar does not map to a schema simple type ** *
Example 1: Map a JavaBean property to an XML attribute.
*@@ -91,12 +90,12 @@ * public void setPrice(java.math.BigDecimal ) {...}; * } * - * <!-- Example: XML Schema fragment --> - * <xs:complexType name="USPrice"> - * <xs:sequence> - * </xs:sequence> - * <xs:attribute name="price" type="xs:decimal"/> - * </xs:complexType> + * <!-- Example: XML Schema fragment --> + * <xs:complexType name="USPrice"> + * <xs:sequence> + * </xs:sequence> + * <xs:attribute name="price" type="xs:decimal"/> + * </xs:complexType> ** *
Example 2: Map a JavaBean property to an XML attribute with anonymous type.
@@ -107,17 +106,17 @@ * // Example: Code fragment * class Foo { * ... - * @XmlAttribute List<Integer> items; + * @XmlAttribute List<Integer> items; * } * - * <!-- Example: XML Schema fragment --> - * <xs:complexType name="foo"> + * <!-- Example: XML Schema fragment --> + * <xs:complexType name="foo"> * ... - * <xs:attribute name="items"> - * <xs:simpleType> - * <xs:list itemType="xs:int"/> - * </xs:simpleType> - * </xs:complexType> + * <xs:attribute name="items"> + * <xs:simpleType> + * <xs:list itemType="xs:int"/> + * </xs:simpleType> + * </xs:complexType> * * * @author Sekhar Vajjhala, Sun Microsystems, Inc.