Source Code Cross Referenced for XmlList.java in  » 6.0-JDK-Modules » jaxb-api » javax » xml » bind » annotation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jaxb api » javax.xml.bind.annotation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package javax.xml.bind.annotation;
02:
03:        import java.lang.annotation.Retention;
04:        import java.lang.annotation.Target;
05:        import static java.lang.annotation.RetentionPolicy.RUNTIME;
06:        import static java.lang.annotation.ElementType.FIELD;
07:        import static java.lang.annotation.ElementType.METHOD;
08:        import static java.lang.annotation.ElementType.PARAMETER;
09:
10:        /**
11:         * Used to map a property to a list simple type.
12:         *
13:         * <p><b>Usage</b> </p>
14:         * <p>
15:         * The <tt>@XmlList</tt> annotation can be used with the
16:         * following program elements: 
17:         * <ul> 
18:         *   <li> JavaBean property </li>
19:         *   <li> field </li>
20:         * </ul>
21:         *
22:         * <p>
23:         * When a collection property is annotated just with @XmlElement,
24:         * each item in the collection will be wrapped by an element.
25:         * For example,
26:         *
27:         * <pre>
28:         * &#64;XmlRootElement
29:         * class Foo {
30:         *     &#64;XmlElement
31:         *     List&lt;String> data;
32:         * }
33:         * </pre>
34:         *
35:         * would produce XML like this:
36:         *
37:         * <pre><xmp>
38:         * <foo>
39:         *   <data>abc</data>
40:         *   <data>def</data>
41:         * </foo>
42:         * </xmp></pre>
43:         *
44:         * &#64;XmlList annotation, on the other hand, allows multiple values to be 
45:         * represented as whitespace-separated tokens in a single element. For example,
46:         *
47:         * <pre>
48:         * &#64;XmlRootElement
49:         * class Foo {
50:         *     &#64;XmlElement
51:         *     &#64;XmlList
52:         *     List&lt;String> data;
53:         * }
54:         * </pre>
55:         *
56:         * the above code will produce XML like this:
57:         *
58:         * <pre><xmp>
59:         * <foo>
60:         *   <data>abc def</data>
61:         * </foo>
62:         * </xmp></pre>
63:         *
64:         * <p>This annotation can be used with the following annotations:
65:         *        {@link XmlElement}, 
66:         *        {@link XmlAttribute},
67:         *        {@link XmlValue},
68:         *        {@link XmlIDREF}.
69:         *  <ul>
70:         *    <li> The use of <tt>@XmlList</tt> with {@link XmlValue} while
71:         *         allowed, is redundant since  {@link XmlList} maps a
72:         *         collection type to a simple schema type that derives by
73:         *         list just as {@link XmlValue} would. </li> 
74:         *
75:         *    <li> The use of <tt>@XmlList</tt> with {@link XmlAttribute} while
76:         *         allowed, is redundant since  {@link XmlList} maps a
77:         *         collection type to a simple schema type that derives by
78:         *         list just as {@link XmlAttribute} would. </li> 
79:         *  </ul>
80:         *
81:         * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
82:         * @since JAXB2.0
83:         */
84:        @Retention(RUNTIME)
85:        @Target({FIELD,METHOD,PARAMETER})
86:        public @interface XmlList {
87:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.