|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.xml.bind.annotation Annotation Type XmlAccessorOrder
@Inherited @Retention(value=RUNTIME) @Target(value={PACKAGE,TYPE}) public @interface XmlAccessorOrder
@Retention(value=RUNTIME)
@Target(value={PACKAGE, TYPE})
控制类中字段和属性的排序。
用法
@XmlAccessorOrder 注释可以与以下程序元素一起使用:
- 包
- 顶层类
有关其他公共信息,请参阅 javax.xml.bind.package javadoc 中的“包规范”。
包上的 @XmlAccessorOrder 注释可应用于包中的所有类。继承语义的应用如下:
- 如果类中有 @XmlAccessorOrder,则使用它。
- 如果 @XmlAccessorOrder 存在于某个超类中,则继承它。
- 否则,将继承包中 @XmlAccessorOrder。
默认规则:
默认情况下,如果包中不存在 @XmlAccessorOrder,那么假定使用以下包级别注释。
@XmlAccessorType(XmlAccessOrder.UNDEFINED)
默认情况下,如果类中不存在 @XmlAccessorOrder,并且没有任何超类是使用 @XmlAccessorOrder 注释的,则假定在类中使用以下默认注释:
@XmlAccessorType(XmlAccessOrder.UNDEFINED)
此注释可以于以下注释一起使用:XmlType
、XmlRootElement
、XmlAccessorType
、XmlSchema
、XmlSchemaType
、XmlSchemaTypes
和 XmlJavaTypeAdapter
。在包级别上它还可以与以下注释一起使用:XmlJavaTypeAdapter
。
since | JAXB2.0 | |
version |
| |
See also | javax.xml.bind.annotation.XmlAccessOrder |
Controls the ordering of fields and properties in a class.
Usage
@XmlAccessorOrder annotation can be used with the following program elements:
- package
- a top level class
See "Package Specification" in javax.xml.bind.package javadoc for additional common information.
The annotation @XmlAccessorOrder on a package applies to all classes in a package. The following inheritance semantics apply:
- If there is a @XmlAccessorOrder on a class, then it is used.
- Otherwise, if a @XmlAccessorOrder exists on one of its super classes, then it is inherited.
- Otherwise, the @XmlAccessorOrder on a package is inherited.
Defaulting Rules:
By default, if @XmlAccessorOrder on a package is absent, then the following package level annotation is assumed.
@XmlAccessorType(XmlAccessOrder.UNDEFINED)
By default, if @XmlAccessorOrder on a class is absent and none of super classes is annotated with XmlAccessorOrder , then the following default on the class is assumed:
@XmlAccessorType(XmlAccessOrder.UNDEFINED)
This annotation can be used with the following annotations:
XmlType
, XmlRootElement
, XmlAccessorType
,
XmlSchema
, XmlSchemaType
, XmlSchemaTypes
,
, XmlJavaTypeAdapter
. It can also be used with the
following annotations at the package level: XmlJavaTypeAdapter
.
- Since:
- JAXB2.0
- Version:
- $Revision: 1.11 $
- Author:
- Sekhar Vajjhala, Sun Microsystems, Inc.
- See Also:
XmlAccessOrder
Optional Element Summary | |
---|---|
XmlAccessOrder |
value
|
abstract public XmlAccessOrder
value()
英文文档:
value
public abstract XmlAccessOrder value
- Default:
- UNDEFINED
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!