@Retention(value=RUNTIME) @Target(value={METHOD,TYPE}) public @interface XmlElement
When used on methods declared on interfaces that derive
from TypedXmlWriter
, it specifies that the invocation
of the method will produce an element of the specified name.
The method signature has to match one of the following patterns.
TypedXmlWriter
.
When this method is called, a new child element is started,
and its content can be written by using the returned TW
object. This child element will be ended when its _commit method
is called.
When used on interfaces that derive from TypedXmlWriter
,
it associates an element name with that interface. This name is
used in a few places, such as in TXW.create(Class,XmlSerializer)
and TypedXmlWriter._element(Class)
.
public abstract String value
public abstract String ns
If the annotation is on an interface and this paramter is left unspecified,
then the namespace URI is taken from XmlNamespace
annotation on
the package that the interface is in. If XmlNamespace
annotation
doesn't exist, the namespace URI will be "".
If the annotation is on a method and this parameter is left unspecified, then the namespace URI is the same as the namespace URI of the writer interface.
Copyright © 2019 Oracle Corporation. All rights reserved.