@Retention(value=RUNTIME) @Target(value=字段) public @interface XmlEnumValue
Enum类型到XML表示。 
       用法
@XmlEnumValue注释可以与以下程序元素一起使用:
有关其他常见信息,请参阅javax.xml.bind.package javadoc中的“Package Specification”。
 该注释与XmlEnum一起提供了枚举类型到XML表示的映射。 
枚举类型映射到具有枚举方面的模式简单类型。 模式类型派生自@XmlEnum.value()中指定的Java类型。 每个枚举常量@XmlEnumValue必须有一个有效的词汇表示类型@XmlEnum.value()
 在没有这个注释的情况下, Enum.name()被用作XML表示。 
示例1:映射枚举常量名称 - >枚举方面
  //Example: Code fragment
     @XmlEnum(String.class)
     public enum Card { CLUBS, DIAMONDS, HEARTS, SPADES }
     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Card">
       <xs:restriction base="xs:string"/>
         <xs:enumeration value="CLUBS"/>
         <xs:enumeration value="DIAMONDS"/>
         <xs:enumeration value="HEARTS"/>
         <xs:enumeration value="SPADES"/>
     </xs:simpleType>  
       示例2:映射枚举常量名称(值) - >枚举方面
  //Example: code fragment
     @XmlType
     @XmlEnum(Integer.class)
     public enum Coin {
         @XmlEnumValue("1") PENNY(1),
         @XmlEnumValue("5") NICKEL(5),
         @XmlEnumValue("10") DIME(10),
         @XmlEnumValue("25") QUARTER(25) }
     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Coin">
       <xs:restriction base="xs:int">
         <xs:enumeration value="1"/>
         <xs:enumeration value="5"/>
         <xs:enumeration value="10"/>
         <xs:enumeration value="25"/>
       </xs:restriction>
     </xs:simpleType>  
       示例3:映射枚举常量名称 - >枚举方面
  //Code fragment
     @XmlType
     @XmlEnum(Integer.class)
     public enum Code {
         @XmlEnumValue("1") ONE,
         @XmlEnumValue("2") TWO;
     }
     <!-- Example: XML Schema fragment -->
     <xs:simpleType name="Code">
       <xs:restriction base="xs:int">
         <xs:enumeration value="1"/>
         <xs:enumeration value="2"/>
       </xs:restriction>
     </xs:simpleType>  
      public abstract String value
 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.