< prev index next >
src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElement.java
Print this page
@@ -34,20 +34,18 @@
import static java.lang.annotation.RetentionPolicy.*;
/**
* Maps a JavaBean property to a XML element derived from property name.
*
- * <p> <b>Usage</b> </p>
+ * <p> <b>Usage</b>
* <p>
* <tt>@XmlElement</tt> annotation can be used with the following program
* elements:
* <ul>
* <li> a JavaBean property </li>
* <li> non static, non transient field </li>
* <li> within {@link XmlElements}
- * <p>
- *
* </ul>
*
* The usage is subject to the following constraints:
* <ul>
* <li> This annotation can be used with following annotations:
@@ -77,11 +75,11 @@
* <b>Example 1: </b> Map a public non static non final field to local
* element
* <pre>
* //Example: Code fragment
* public class USPrice {
- * @XmlElement(name="itemprice")
+ * {@literal @}XmlElement(name="itemprice")
* public java.math.BigDecimal price;
* }
* {@code
*
* <!-- Example: Local XML Schema element -->
@@ -93,14 +91,13 @@
* }</pre>
* <p>
*
* <b> Example 2: </b> Map a field to a nillable element.
* <pre>
- *
* //Example: Code fragment
* public class USPrice {
- * @XmlElement(nillable=true)
+ * {@literal @}XmlElement(nillable=true)
* public java.math.BigDecimal price;
* }
* {@code
*
* <!-- Example: Local XML Schema element -->
@@ -111,14 +108,13 @@
* </xs:complexType>
* }</pre>
* <p>
* <b> Example 3: </b> Map a field to a nillable, required element.
* <pre>
- *
* //Example: Code fragment
* public class USPrice {
- * @XmlElement(nillable=true, required=true)
+ * {@literal @}XmlElement(nillable=true, required=true)
* public java.math.BigDecimal price;
* }
* {@code
*
* <!-- Example: Local XML Schema element -->
@@ -132,11 +128,10 @@
* <p> <b>Example 4: </b>Map a JavaBean property to an XML element
* with anonymous type.</p>
* <p>
* See Example 6 in @{@link XmlType}.
*
- * <p>
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @since 1.6, JAXB 2.0
*/
@Retention(RUNTIME) @Target({FIELD, METHOD, PARAMETER})
< prev index next >