< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElementDecl.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -60,27 +60,27 @@
  * <pre>
  *     // Example: code fragment
  *     @XmlRegistry
  *     class ObjectFactory {
  *         @XmlElementDecl(name="foo")
- *         JAXBElement&lt;String> createFoo(String s) { ... }
+ *         JAXBElement&lt;String&gt; createFoo(String s) { ... }
  *     }
  * </pre>
  * <pre>
- *     &lt;!-- XML input -->
- *       &lt;foo>string</foo>
+ *     &lt;!-- XML input --&gt;
+ *       &lt;foo&gt;string&lt;/foo&gt;
  *
  *     // Example: code fragment corresponding to XML input
- *     JAXBElement<String> o =
- *     (JAXBElement<String>)unmarshaller.unmarshal(aboveDocument);
+ *     JAXBElement&lt;String&gt; o =
+ *     (JAXBElement&lt;String&gt;)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"
  *
- *     &lt;!-- Example: XML schema definition -->
- *     &lt;xs:element name="foo" type="xs:string"/>
+ *     &lt;!-- Example: XML schema definition --&gt;
+ *     &lt;xs:element name="foo" type="xs:string"/&gt;
  * </pre>
  *
  * <p><b>Example 2: </b> Element declaration with non local scope
  * <p>
  * The following example illustrates the use of scope annotation

@@ -89,41 +89,41 @@
  * <p>
  * The following example may be replaced in a future revision of
  * this javadoc.
  *
  * <pre>
- *     &lt;!-- Example: XML schema definition -->
- *     &lt;xs:schema>
- *       &lt;xs:complexType name="pea">
- *         &lt;xs:choice maxOccurs="unbounded">
- *           &lt;xs:element name="foo" type="xs:string"/>
- *           &lt;xs:element name="bar" type="xs:string"/>
- *         &lt;/xs:choice>
- *       &lt;/xs:complexType>
- *       &lt;xs:element name="foo" type="xs:int"/>
- *     &lt;/xs:schema>
+ *     &lt;!-- Example: XML schema definition --&gt;
+ *     &lt;xs:schema&gt;
+ *       &lt;xs:complexType name="pea"&gt;
+ *         &lt;xs:choice maxOccurs="unbounded"&gt;
+ *           &lt;xs:element name="foo" type="xs:string"/&gt;
+ *           &lt;xs:element name="bar" type="xs:string"/&gt;
+ *         &lt;/xs:choice&gt;
+ *       &lt;/xs:complexType&gt;
+ *       &lt;xs:element name="foo" type="xs:int"/&gt;
+ *     &lt;/xs:schema&gt;
  * </pre>
  * <pre>
  *     // Example: expected default binding
  *     class Pea {
  *         @XmlElementRefs({
  *             @XmlElementRef(name="foo",type=JAXBElement.class)
  *             @XmlElementRef(name="bar",type=JAXBElement.class)
  *         })
- *         List&lt;JAXBElement&lt;String>> fooOrBar;
+ *         List&lt;JAXBElement&lt;String&gt;&gt; fooOrBar;
  *     }
  *
  *     @XmlRegistry
  *     class ObjectFactory {
  *         @XmlElementDecl(scope=Pea.class,name="foo")
- *         JAXBElement<String> createPeaFoo(String s);
+ *         JAXBElement&lt;String&gt; createPeaFoo(String s);
  *
  *         @XmlElementDecl(scope=Pea.class,name="bar")
- *         JAXBElement<String> createPeaBar(String s);
+ *         JAXBElement&lt;String&gt; createPeaBar(String s);
  *
  *         @XmlElementDecl(name="foo")
- *         JAXBElement<Integer> createFoo(Integer i);
+ *         JAXBElement&lt;Integer&gt; createFoo(Integer i);
  *     }
  *
  * </pre>
  * Without scope createFoo and createPeaFoo would become ambiguous
  * since both of them map to a XML schema element with the same local
< prev index next >