KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > bind > annotation > XmlElementRefs


1 /*
2  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.bind.annotation;
7
8 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
9 import java.lang.annotation.Retention JavaDoc;
10 import java.lang.annotation.Target JavaDoc;
11 import static java.lang.annotation.ElementType.FIELD JavaDoc;
12 import static java.lang.annotation.ElementType.METHOD JavaDoc;
13 import static java.lang.annotation.RetentionPolicy.RUNTIME JavaDoc;
14
15 /**
16  * Marks a property that refers to classes with {@link XmlElement}
17  * or JAXBElement.
18  *
19  * <p>
20  * Compared to an element property (property with {@link XmlElement}
21  * annotation), a reference property has a different substitution semantics.
22  * When a sub-class is assigned to a property, an element property produces
23  * the same tag name with @xsi:type, whereas a reference property produces
24  * a different tag name (the tag name that's on the the sub-class.)
25  *
26  * <p> This annotation can be used with the following annotations:
27  * {@link XmlJavaTypeAdapter}, {@link XmlElementWrapper}.
28  *
29  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
30  *
31  * @see XmlElementWrapper
32  * @see XmlElementRef
33  * @since JAXB2.0
34  */

35 @Retention JavaDoc(RUNTIME)
36 @Target JavaDoc({FIELD,METHOD})
37 public @interface XmlElementRefs {
38     XmlElementRef[] value();
39 }
40
Popular Tags