|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.xml.bind.annotation Annotation Type XmlElementRefs
@Target(value={FIELD, METHOD})
标记一个属性,该属性引用带有
XmlElement
或 JAXBElement 的类。
与元素属性(带有 XmlElement
注释的属性)比较,引用属性具有不同的替换语义。在将子类分配给属性时,元素属性将生成带有 @xsi:type 的相同标记名称,而引用属性则生成一个不同的标记名称(子类上的标记名称)。
此注释可与下列注释一起使用:XmlJavaTypeAdapter
和 XmlElementWrapper
。
since | JAXB2.0 |
See also | javax.xml.bind.annotation.XmlElementWrapper, javax.xml.bind.annotation.XmlElementRef |
Marks a property that refers to classes with XmlElement
or JAXBElement.
Compared to an element property (property with XmlElement
annotation), a reference property has a different substitution semantics.
When a sub-class is assigned to a property, an element property produces
the same tag name with @xsi:type, whereas a reference property produces
a different tag name (the tag name that's on the the sub-class.)
This annotation can be used with the following annotations:
XmlJavaTypeAdapter
, XmlElementWrapper
.
- Since:
- JAXB2.0
- Author:
- Kohsuke Kawaguchi, Sun Microsystems, Inc.
- Sekhar Vajjhala, Sun Microsystems, Inc.
- See Also:
XmlElementWrapper
,XmlElementRef
Required Element Summary | |
---|---|
XmlElementRef[] |
value
|
Element Detail |
---|
abstract public XmlElementRef[]
value()
英文文档:
value
public abstract XmlElementRef[] value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!