Skip to content

Commit 80da6a2

Browse files
senivamlukasj
authored andcommitted
Snippet fix
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
1 parent 31fd9dc commit 80da6a2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

api/src/main/java/jakarta/xml/bind/annotation/XmlElements.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* </ul>
3838
*
3939
* This annotation is intended for annotation a JavaBean collection
40-
* property (e.g. List).
40+
* property (e.g. List).
4141
*
4242
* <p><b>Usage</b></p>
4343
*
@@ -54,15 +54,15 @@
5454
* additional common information.</p>
5555
*
5656
* <hr>
57-
*
57+
*
5858
* <p><b>Example 1:</b> Map to a list of elements</p>
5959
* {@snippet :
6060
* // Mapped code fragment
6161
* public class Foo {
6262
* @XmlElements({
6363
* @XmlElement(name="A", type=Integer.class),
6464
* @XmlElement(name="B", type=Float.class)
65-
* })
65+
* })
6666
* public List items;
6767
* }
6868
* }
@@ -114,7 +114,7 @@
114114
* </xs:complexType>
115115
* }
116116
*
117-
* <p><b>Example 3:</b> Change element name based on type using an adapter.
117+
* <p><b>Example 3:</b> Change element name based on type using an adapter.
118118
* </p>
119119
* {@snippet :
120120
* class Foo {
@@ -125,7 +125,7 @@
125125
* })
126126
* Q bar;
127127
* }
128-
*
128+
*
129129
* @XmlType abstract class P {...}
130130
* @XmlType(name="PX") class PX extends P {...}
131131
* @XmlType(name="PY") class PY extends P {...}
@@ -145,9 +145,9 @@
145145
* </xs:sequence>
146146
* </xs:complexType>
147147
* }
148-
*
148+
*
149149
* @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
150-
* @see XmlElement
150+
* @see XmlElement
151151
* @see XmlElementRef
152152
* @see XmlElementRefs
153153
* @see XmlJavaTypeAdapter

api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@
7474
* // Name, Quantity and ProductName. Text data is represented as
7575
* // java.util.String for text.
7676
* @XmlMixed
77-
* @XmlElementRef(name="productName", type=JAXBElement.class)
78-
* @XmlElementRef(name="quantity", type=JAXBElement.class)
79-
* @XmlElementRef(name="name", type=JAXBElement.class)
77+
* @XmlElementRefs({
78+
* @XmlElementRef(name="productName", type=JAXBElement.class)
79+
* @XmlElementRef(name="quantity", type=JAXBElement.class)
80+
* @XmlElementRef(name="name", type=JAXBElement.class)
81+
* })
8082
* List getContent() {...}
8183
* }
8284
* }
@@ -98,7 +100,7 @@
98100
* // add child element information item
99101
* gcl.add(ObjectFactory.createLetterBodyName("Robert Smith"));
100102
* gcl.add("Your order of "); // add text information item as a String
101-
*
103+
*
102104
* // add children element information items
103105
* gcl.add(ObjectFactory.createLetterBodyQuantity(new BigInteger("1")));
104106
* gcl.add(ObjectFactory.createLetterBodyProductName("Baby Monitor"));

0 commit comments

Comments
 (0)