23 * questions. 24 */ 25 26 package javax.xml.bind.annotation; 27 28 import javax.xml.namespace.QName; 29 import java.lang.annotation.Retention; 30 import java.lang.annotation.Target; 31 import java.util.Map; 32 33 import static java.lang.annotation.RetentionPolicy.RUNTIME; 34 import static java.lang.annotation.ElementType.FIELD; 35 import static java.lang.annotation.ElementType.METHOD; 36 37 /** 38 * <p> 39 * Maps a JavaBean property to a map of wildcard attributes. 40 * 41 * <p> <b>Usage</b> </p> 42 * <p> 43 * The <tt>@XmlAnyAttribute</tt> annotation can be used with the 44 * following program elements: 45 * <ul> 46 * <li> JavaBean property </li> 47 * <li> non static, non transient field </li> 48 * </ul> 49 * 50 * <p>See "Package Specification" in javax.xml.bind.package javadoc for 51 * additional common information.</p> 52 * 53 * The usage is subject to the following constraints: 54 * <ul> 55 * <li> At most one field or property in a class can be annotated 56 * with <tt>@XmlAnyAttribute</tt>. </li> 57 * <li> The type of the property or the field must <tt>java.util.Map</tt> </li> 58 * </ul> 59 * 60 * <p> 61 * While processing attributes to be unmarshalled into a value class, 62 * each attribute that is not statically associated with another 63 * JavaBean property, via {@link XmlAttribute}, is entered into the 64 * wildcard attribute map represented by 65 * {@link Map}<{@link QName},{@link Object}>. The attribute QName is the 66 * map's key. The key's value is the String value of the attribute. 67 * 68 * @author Kohsuke Kawaguchi, Sun Microsystems, Inc. 69 * @since 1.6, JAXB 2.0 70 */ 71 @Retention(RUNTIME) 72 @Target({FIELD,METHOD}) 73 public @interface XmlAnyAttribute { 74 } | 23 * questions. 24 */ 25 26 package javax.xml.bind.annotation; 27 28 import javax.xml.namespace.QName; 29 import java.lang.annotation.Retention; 30 import java.lang.annotation.Target; 31 import java.util.Map; 32 33 import static java.lang.annotation.RetentionPolicy.RUNTIME; 34 import static java.lang.annotation.ElementType.FIELD; 35 import static java.lang.annotation.ElementType.METHOD; 36 37 /** 38 * <p> 39 * Maps a JavaBean property to a map of wildcard attributes. 40 * 41 * <p> <b>Usage</b> </p> 42 * <p> 43 * The {@code @XmlAnyAttribute} annotation can be used with the 44 * following program elements: 45 * <ul> 46 * <li> JavaBean property </li> 47 * <li> non static, non transient field </li> 48 * </ul> 49 * 50 * <p>See "Package Specification" in javax.xml.bind.package javadoc for 51 * additional common information.</p> 52 * 53 * The usage is subject to the following constraints: 54 * <ul> 55 * <li> At most one field or property in a class can be annotated 56 * with {@code @XmlAnyAttribute}. </li> 57 * <li> The type of the property or the field must {@code java.util.Map} </li> 58 * </ul> 59 * 60 * <p> 61 * While processing attributes to be unmarshalled into a value class, 62 * each attribute that is not statically associated with another 63 * JavaBean property, via {@link XmlAttribute}, is entered into the 64 * wildcard attribute map represented by 65 * {@link Map}<{@link QName},{@link Object}>. The attribute QName is the 66 * map's key. The key's value is the String value of the attribute. 67 * 68 * @author Kohsuke Kawaguchi, Sun Microsystems, Inc. 69 * @since 1.6, JAXB 2.0 70 */ 71 @Retention(RUNTIME) 72 @Target({FIELD,METHOD}) 73 public @interface XmlAnyAttribute { 74 } |