@Retention(value=RUNTIME) @Target(value={FIELD,METHOD,PACKAGE}) public @interface XmlSchemaType
使用
@XmlSchemaType注释可以用下面的程序元素:
对于java类型适用于所有引用了房地产领域@XmlSchemaType java类型定义的注释。对房地产领域指定@XmlSchemaType注释覆盖在包级别指定的@XmlSchemaType注释。
这个注释可以用下面的注释:XmlElement
,XmlAttribute
。
例1:自定义映射XMLGregorianCalendar场上。
/ /例如:代码片段公共课usprice {@ xmlelement@ XmlSchemaType(name=“日期”)公共xmlgregoriancalendar日期;}<!例如:本地XML模式元素< xs:complexType名称=“usprice”/>< xs:序列>< xs:元名称=“日期”type=“XS:日期”/>< /序列>< / xs:名称>
例2:自定义映射xmlgregoriancalendar封装级
包foo;@javax.xml.bind.annotation.xmlschematype(名称=“日期”,类型:javax. XML数据类型。xmlgregoriancalendar类)。}
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.