113 * }
114 *
115 * @XmlRegistry
116 * class ObjectFactory {
117 * @XmlElementDecl(scope=Pea.class,name="foo")
118 * JAXBElement<String> createPeaFoo(String s);
119 *
120 * @XmlElementDecl(scope=Pea.class,name="bar")
121 * JAXBElement<String> createPeaBar(String s);
122 *
123 * @XmlElementDecl(name="foo")
124 * JAXBElement<Integer> createFoo(Integer i);
125 * }
126 *
127 * </pre>
128 * Without scope createFoo and createPeaFoo would become ambiguous
129 * since both of them map to a XML schema element with the same local
130 * name "foo".
131 *
132 * @see XmlRegistry
133 * @since JAXB 2.0
134 */
135 @Retention(RUNTIME)
136 @Target({METHOD})
137 public @interface XmlElementDecl {
138 /**
139 * scope of the mapping.
140 *
141 * <p>
142 * If this is not {@link XmlElementDecl.GLOBAL}, then this element
143 * declaration mapping is only active within the specified class.
144 */
145 Class scope() default GLOBAL.class;
146
147 /**
148 * namespace name of the XML element.
149 * <p>
150 * If the value is "##default", then the value is the namespace
151 * name for the package of the class containing this factory method.
152 *
153 * @see #name()
|
113 * }
114 *
115 * @XmlRegistry
116 * class ObjectFactory {
117 * @XmlElementDecl(scope=Pea.class,name="foo")
118 * JAXBElement<String> createPeaFoo(String s);
119 *
120 * @XmlElementDecl(scope=Pea.class,name="bar")
121 * JAXBElement<String> createPeaBar(String s);
122 *
123 * @XmlElementDecl(name="foo")
124 * JAXBElement<Integer> createFoo(Integer i);
125 * }
126 *
127 * </pre>
128 * Without scope createFoo and createPeaFoo would become ambiguous
129 * since both of them map to a XML schema element with the same local
130 * name "foo".
131 *
132 * @see XmlRegistry
133 * @since 1.6, JAXB 2.0
134 */
135 @Retention(RUNTIME)
136 @Target({METHOD})
137 public @interface XmlElementDecl {
138 /**
139 * scope of the mapping.
140 *
141 * <p>
142 * If this is not {@link XmlElementDecl.GLOBAL}, then this element
143 * declaration mapping is only active within the specified class.
144 */
145 Class scope() default GLOBAL.class;
146
147 /**
148 * namespace name of the XML element.
149 * <p>
150 * If the value is "##default", then the value is the namespace
151 * name for the package of the class containing this factory method.
152 *
153 * @see #name()
|