21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package javax.xml.bind.annotation; 27 28 import java.lang.annotation.Retention; 29 import java.lang.annotation.Target; 30 31 import static java.lang.annotation.ElementType.FIELD; 32 import static java.lang.annotation.ElementType.METHOD; 33 import static java.lang.annotation.ElementType.PACKAGE; 34 import static java.lang.annotation.RetentionPolicy.RUNTIME; 35 36 /** 37 * Maps a Java type to a simple schema built-in type. 38 * 39 * <p> <b>Usage</b> </p> 40 * <p> 41 * <tt>@XmlSchemaType</tt> annotation can be used with the following program 42 * elements: 43 * <ul> 44 * <li> a JavaBean property </li> 45 * <li> field </li> 46 * <li> package</li> 47 * </ul> 48 * 49 * <p> <tt>@XmlSchemaType</tt> annotation defined for Java type 50 * applies to all references to the Java type from a property/field. 51 * A <tt>@XmlSchemaType</tt> annotation specified on the 52 * property/field overrides the <tt>@XmlSchemaType</tt> annotation 53 * specified at the package level. 54 * 55 * <p> This annotation can be used with the following annotations: 56 * {@link XmlElement}, {@link XmlAttribute}. 57 * <p> 58 * <b>Example 1: </b> Customize mapping of XMLGregorianCalendar on the 59 * field. 60 * 61 * <pre> 62 * //Example: Code fragment 63 * public class USPrice { 64 * @XmlElement 65 * @XmlSchemaType(name="date") 66 * public XMLGregorianCalendar date; 67 * } 68 * {@code 69 * 70 * <!-- Example: Local XML Schema element --> 71 * <xs:complexType name="USPrice"/> 72 * <xs:sequence> | 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package javax.xml.bind.annotation; 27 28 import java.lang.annotation.Retention; 29 import java.lang.annotation.Target; 30 31 import static java.lang.annotation.ElementType.FIELD; 32 import static java.lang.annotation.ElementType.METHOD; 33 import static java.lang.annotation.ElementType.PACKAGE; 34 import static java.lang.annotation.RetentionPolicy.RUNTIME; 35 36 /** 37 * Maps a Java type to a simple schema built-in type. 38 * 39 * <p> <b>Usage</b> </p> 40 * <p> 41 * {@code @XmlSchemaType} annotation can be used with the following program 42 * elements: 43 * <ul> 44 * <li> a JavaBean property </li> 45 * <li> field </li> 46 * <li> package</li> 47 * </ul> 48 * 49 * <p> {@code @XmlSchemaType} annotation defined for Java type 50 * applies to all references to the Java type from a property/field. 51 * A {@code @XmlSchemaType} annotation specified on the 52 * property/field overrides the {@code @XmlSchemaType} annotation 53 * specified at the package level. 54 * 55 * <p> This annotation can be used with the following annotations: 56 * {@link XmlElement}, {@link XmlAttribute}. 57 * <p> 58 * <b>Example 1: </b> Customize mapping of XMLGregorianCalendar on the 59 * field. 60 * 61 * <pre> 62 * //Example: Code fragment 63 * public class USPrice { 64 * @XmlElement 65 * @XmlSchemaType(name="date") 66 * public XMLGregorianCalendar date; 67 * } 68 * {@code 69 * 70 * <!-- Example: Local XML Schema element --> 71 * <xs:complexType name="USPrice"/> 72 * <xs:sequence> |