Skip to content

Commit

Permalink
Snippet fix
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam authored and lukasj committed Feb 19, 2024
1 parent 31fd9dc commit 80da6a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions api/src/main/java/jakarta/xml/bind/annotation/XmlElements.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* </ul>
*
* This annotation is intended for annotation a JavaBean collection
* property (e.g. List).
* property (e.g. List).
*
* <p><b>Usage</b></p>
*
Expand All @@ -54,15 +54,15 @@
* additional common information.</p>
*
* <hr>
*
*
* <p><b>Example 1:</b> Map to a list of elements</p>
* {@snippet :
* // Mapped code fragment
* public class Foo {
* @XmlElements({
* @XmlElement(name="A", type=Integer.class),
* @XmlElement(name="B", type=Float.class)
* })
* })
* public List items;
* }
* }
Expand Down Expand Up @@ -114,7 +114,7 @@
* </xs:complexType>
* }
*
* <p><b>Example 3:</b> Change element name based on type using an adapter.
* <p><b>Example 3:</b> Change element name based on type using an adapter.
* </p>
* {@snippet :
* class Foo {
Expand All @@ -125,7 +125,7 @@
* })
* Q bar;
* }
*
*
* @XmlType abstract class P {...}
* @XmlType(name="PX") class PX extends P {...}
* @XmlType(name="PY") class PY extends P {...}
Expand All @@ -145,9 +145,9 @@
* </xs:sequence>
* </xs:complexType>
* }
*
*
* @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
* @see XmlElement
* @see XmlElement
* @see XmlElementRef
* @see XmlElementRefs
* @see XmlJavaTypeAdapter
Expand Down
10 changes: 6 additions & 4 deletions api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@
* // Name, Quantity and ProductName. Text data is represented as
* // java.util.String for text.
* @XmlMixed
* @XmlElementRef(name="productName", type=JAXBElement.class)
* @XmlElementRef(name="quantity", type=JAXBElement.class)
* @XmlElementRef(name="name", type=JAXBElement.class)
* @XmlElementRefs({
* @XmlElementRef(name="productName", type=JAXBElement.class)
* @XmlElementRef(name="quantity", type=JAXBElement.class)
* @XmlElementRef(name="name", type=JAXBElement.class)
* })
* List getContent() {...}
* }
* }
Expand All @@ -98,7 +100,7 @@
* // add child element information item
* gcl.add(ObjectFactory.createLetterBodyName("Robert Smith"));
* gcl.add("Your order of "); // add text information item as a String
*
*
* // add children element information items
* gcl.add(ObjectFactory.createLetterBodyQuantity(new BigInteger("1")));
* gcl.add(ObjectFactory.createLetterBodyProductName("Baby Monitor"));
Expand Down

0 comments on commit 80da6a2

Please sign in to comment.