Top Description Annotations
module com.sun.xml.bind.osgi

Package com.sun.xml.txw2.annotation


Defines a set of annotations that can be used on TypedXmlWriter interfaces.

Package-level Annotation

com.sun.xml.txw2.annotation.XmlNamespace can be used on a package to designate the namespace URI for the whole package.

Interface Annotation

com.sun.xml.txw2.annotation.XmlElement can be used on TypedXmlWriter-derived interfaces to associate a tag name to that interface.

Method Annotations

com.sun.xml.txw2.annotation.XmlElement, com.sun.xml.txw2.annotation.XmlAttribute, or com.sun.xml.txw2.annotation.XmlValue can be used on a method declared on a TypedXmLWriter-derived interface. Those annotations are mutually-exclusive. See their javadoc for details. If none of the above three annotations are specified, com.sun.xml.txw2.annotation.XmlElement is assumed.

Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
XmlAttribute

Specifies that the invocation of the method will produce an attribute.

public @interface
XmlCDATA

Used along with XmlElement to write a CDATA section, instead of the normal PCDATA.

public @interface
XmlElement

Specifies the name of the XML element.

public @interface
XmlNamespace

Declares the namespace URI of the TypedXmlWriters in a package.

public @interface
XmlValue

Specifies that the invocation of the method will produce a text

The method signature has to match the form R foo(DT1,DT2,..)

R is either void or the type to which the interface that declares this method is assignable.