39 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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 XmlAnyAttribute">Annotation Type XmlAnyAttribute</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#FIELD">字段</a>,<a href="../../../../java/lang/annotation/ElementType.html#METHOD">METHOD</a>})
public @interface <span class="memberNameLabel">XmlAnyAttribute</span></pre>
<div class="block">
<p> <span>将JavaBean属性映射到通配符属性的映射。</span> </p>
<p> <span><b>用法</b></span> </p>
<p> <span><tt>@XmlAnyAttribute</tt>注释可以与以下程序元素一起使用:</span> </p>
<ul>
<li> <span>JavaBean属性</span> </li>
<li> <span>非静态,非瞬态场</span> </li>
</ul>
<p> <span>有关其他常见信息请参阅javax.xml.bind.package javadoc中的“Package Specification”。</span> </p>
<span>用法受以下限制:</span>
<ul>
<li> <span>在一个类中最多一个字段或属性可以与<tt>@XmlAnyAttribute</tt>进行注释。</span> </li>
<li> <span>属性或字段的类型必须为<tt>java.util.Map</tt></span> </li>
</ul>
<p> <span>虽然处理属性被解组成值类即不是静态与另一JavaBean属性相关联的每个属性经由<a href="../../../../javax/xml/bind/annotation/XmlAttribute.html" title="javax.xml.bind.annotation中的注释"><code>XmlAttribute</code></a> ,被输入到通配符属性映射表示为<a href="../../../../java/util/Map.html" title="java.util中的接口"><code>Map</code></a> &lt; <a href="../../../../javax/xml/namespace/QName.html" title="javax.xml.namespace中的类"><code>QName</code></a> <a href="../../../../java/lang/Object.html" title="java.lang中的类"><code>Object</code></a> &gt;</span> <span>属性QName是地图的关键字。</span> <span>键的值是属性的String值。</span> </p>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
JAXB2.0
</dd>
</dl> </li>
</ul>
</div>
</div>