01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.bind.annotation;
07:
08: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
09: import java.lang.annotation.Target;
10: import java.lang.annotation.Retention;
11: import java.lang.annotation.Inherited;
12:
13: import static java.lang.annotation.ElementType.*;
14: import static java.lang.annotation.RetentionPolicy.*;
15:
16: /**
17: * <p> Controls the ordering of fields and properties in a class. </p>
18: *
19: * <h3>Usage </h3>
20: *
21: * <p> <tt> @XmlAccessorOrder </tt> annotation can be used with the following
22: * program elements:</p>
23: *
24: * <ul>
25: * <li> package</li>
26: * <li> a top level class </li>
27: * </ul>
28: *
29: * <p> See "Package Specification" in <tt>javax.xml.bind</tt> package javadoc for
30: * additional common information.</p>
31: *
32: * <p>The effective {@link XmlAccessOrder} on a class is determined
33: * as follows:
34: *
35: * <ul>
36: * <li> If there is a <tt>@XmlAccessorOrder</tt> on a class, then
37: * it is used. </li>
38: * <li> Otherwise, if a <tt>@XmlAccessorOrder </tt> exists on one of
39: * its super classes, then it is inherited (by the virtue of
40: * {@link Inherited})
41: * <li> Otherwise, the <tt>@XmlAccessorOrder</tt> on the package
42: * of the class is used, if it's there.
43: * <li> Otherwise {@link XmlAccessOrder#UNDEFINED}.
44: * </ul>
45: *
46: * <p>This annotation can be used with the following annotations:
47: * {@link XmlType}, {@link XmlRootElement}, {@link XmlAccessorType},
48: * {@link XmlSchema}, {@link XmlSchemaType}, {@link XmlSchemaTypes},
49: * , {@link XmlJavaTypeAdapter}. It can also be used with the
50: * following annotations at the package level: {@link XmlJavaTypeAdapter}.
51: *
52: * @author Sekhar Vajjhala, Sun Microsystems, Inc.
53: * @since JAXB2.0
54: * @version $Revision: 1.12 $
55: * @see XmlAccessOrder
56: */
57:
58: @Inherited
59: @Retention(RUNTIME)
60: @Target({PACKAGE,TYPE})
61: public @interface XmlAccessorOrder {
62: XmlAccessOrder value() default XmlAccessOrder.UNDEFINED;
63: }
|