93 lines
4.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.xml.bind.annotation
</div>
<h2 class="title" title="Annotation Type XmlEnum">Annotation Type XmlEnum</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr/> <br/> <pre><a href="../../../../java/lang/annotation/Retention.html" title="annotation in java.lang.annotation">@Retention</a>(<a href="../../../../java/lang/annotation/Retention.html#value--">value</a>=<a href="../../../../java/lang/annotation/RetentionPolicy.html#RUNTIME">RUNTIME</a>)
<a href="../../../../java/lang/annotation/Target.html" title="annotation in java.lang.annotation">@Target</a>(<a href="../../../../java/lang/annotation/Target.html#value--">value</a>=<a href="../../../../java/lang/annotation/ElementType.html#TYPE">TYPE</a>)
public @interface <span class="memberNameLabel">XmlEnum</span></pre>
<div class="block">
<p> <span>将枚举类型<a href="../../../../java/lang/Enum.html" title="java.lang中的类"><code>Enum</code>映射</a>到XML表示。</span> </p>
<p> <span>该注释与<a href="../../../../javax/xml/bind/annotation/XmlEnumValue.html" title="javax.xml.bind.annotation中的注释"><code>XmlEnumValue</code></a>一起提供了枚举类型到XML表示的映射。</span> </p>
<p> <span><b>用法</b></span> </p>
<p> <span><tt>@XmlEnum</tt>注释可以与以下程序元素一起使用:</span> </p>
<ul>
<li> <span>枚举类型</span> </li>
</ul>
<p> <span>用法受以下限制:</span> </p>
<ul>
<li> <span>这个注解可以使用下面的其他注释: <a href="../../../../javax/xml/bind/annotation/XmlType.html" title="javax.xml.bind.annotation中的注释"><code>XmlType</code></a> <a href="../../../../javax/xml/bind/annotation/XmlRootElement.html" title="javax.xml.bind.annotation中的注释"><code>XmlRootElement</code></a></span> </li>
</ul>
<p> <span>有关其他常见信息请参阅javax.xml.bind.package javadoc中的“Package Specification”</span> </p>
<p> <span>枚举类型映射到具有枚举方面的模式简单类型。</span> <span>模式类型从Java类型派生到<tt>@XmlEnum.value()</tt></span> <span>每个枚举常量<tt>@XmlEnumValue</tt>必须具有@XmlEnum.value()类型的有效词汇<tt>表示</tt></span> </p>
<p> <span><b>示例:</b>参见<a href="../../../../javax/xml/bind/annotation/XmlEnumValue.html" title="javax.xml.bind.annotation中的注释"><code>XmlEnumValue</code></a>中的<a href="../../../../javax/xml/bind/annotation/XmlEnumValue.html" title="javax.xml.bind.annotation中的注释">示例</a></span> </p>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
JAXB2.0
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.optional.element.summary">
<!-- --> </a> <h3>Optional Element Summary</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Optional Element Summary table, listing optional elements, and an explanation">
<caption>
<span>Optional Elements</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Optional Element and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/xml/bind/annotation/XmlEnum.html#value--">value</a></span></code>
<div class="block">
映射到XML简单类型的Java类型。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.element.detail">
<!-- --> </a> <h3>Element Detail</h3> <a name="value--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>value</h4> <pre>public abstract <a href="../../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; value</pre>
<div class="block">
映射到XML简单类型的Java类型。
</div>
<dl>
<dt>
Default:
</dt>
<dd>
java.lang.String.class
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>