- java.lang.Object
-
- com.sun.xml.txw2.TXW
-
public abstract class TXW extends Object
Entry point to TXW.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends TypedXmlWriter>
Tcreate(Class<T> rootElement, XmlSerializer out)Creates a newTypedXmlWriterto write a new instance of a document.static <T extends TypedXmlWriter>
Tcreate(QName tagName, Class<T> rootElement, XmlSerializer out)Creates a newTypedXmlWriterto write a new instance of a document.
-
-
-
Method Detail
-
create
public static <T extends TypedXmlWriter> T create(Class<T> rootElement, XmlSerializer out)
Creates a newTypedXmlWriterto write a new instance of a document.- Type Parameters:
T- an instance ofTypedXmlWriter- Parameters:
rootElement- TheTypedXmlWriterinterface that declares the content model of the root element. This interface must haveXmlElementannotation on it to designate the tag name of the root element.out- The target of the writing.- Returns:
- always return non-null
TypedXmlWriterthat can be used to write the contents of the root element.
-
create
public static <T extends TypedXmlWriter> T create(QName tagName, Class<T> rootElement, XmlSerializer out)
Creates a newTypedXmlWriterto write a new instance of a document.Similar to the other method, but this version allows the caller to set the tag name at the run-time.
- Type Parameters:
T- an instance ofTypedXmlWriter- Parameters:
tagName- The tag name of the root document.rootElement- TheTypedXmlWriterinterface that declares the content model of the root element. This interface must haveXmlElementannotation on it to designate the tag name of the root element.out- The target of the writing.- Returns:
- always return non-null
TypedXmlWriterthat can be used to write the contents of the root element. - See Also:
create(Class,XmlSerializer)
-
-