TypedXmlWriter interfaces.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | blocked
Set to true if the start eleent is blocked. |
| pack-priv final Document | |
| pack-priv final EndTag | |
| private ContainerElement | |
| private ContainerElement | |
| private final String | nsUri
Namespace URI of this element. |
| private final ContainerElement | |
| private ContainerElement | prevOpen
Uncommitted |
| pack-priv StartTag | startTag
Initially, point to the start tag token, but once we know we are done with the start tag, we will reset it to null so that the token sequence can be GC-ed. |
| private Content |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | _attribute(String localName, Object value)
Implements com. Adds an attribute of the given name and the value. |
| public void | _attribute(String nsUri, String localName, Object value)
Implements com. Adds an attribute of the given name and the value. |
| public void | _attribute(QName attributeName, Object value)
Implements com. Adds an attribute of the given name and the value. |
| public <T extends TypedXmlWriter> T | _cast(Class<T> facadeType)
Implements com. Returns a different interface for this typed XML Writer. |
| public void | |
| public void | |
| private void | |
| public <T extends TypedXmlWriter> T | _element(String localName, Class<T> contentModel)
Implements com. Appends a new child element. |
| public <T extends TypedXmlWriter> T | _element(QName tagName, Class<T> contentModel)
Implements com. Appends a new child element. |
| public <T extends TypedXmlWriter> T | _element(Class<T> contentModel)
Implements com. Appends a new child element. |
| public <T extends TypedXmlWriter> T | _element(String nsUri, String localName, Class<T> contentModel)
Implements com. Appends a new child element. |
| public void | _namespace(String uri)
Implements com. Declares a new namespace URI on this element. |
| public void | _namespace(String uri, String prefix)
Implements com. Declares a new namespace URI on this element to a specific prefix. |
| public void | _namespace(String uri, boolean requirePrefix)
Implements com. Declares a new namespace URI on this element. |
| public void | |
| private void | |
| private void | |
| private Object | |
| public void | block()
Implements com. Blocks the writing of the start tag so that new attributes can be added even after child elements are appended. |
| private void | |
| public void | commit()
Implements com. Commits this element (and all its descendants) to the output. |
| public void | commit(boolean includingAllPredecessors)
Implements com. Commits this element (and all its descendants) to the output. |
| public Document | getDocument()
Implements com. Gets the |
| private String | |
| public Object | invoke(Object proxy, Method method, Object[] args)
Implements java. Processes a method invocation on a proxy instance and returns the result. |
| pack-priv boolean | |
| private boolean | |
| private boolean |
| blocked | back to summary |
|---|---|
| private boolean blocked Set to true if the start eleent is blocked. | |
| document | back to summary |
|---|---|
| pack-priv final Document document | |
| endTag | back to summary |
|---|---|
| pack-priv final EndTag endTag | |
| lastOpenChild | back to summary |
|---|---|
| private ContainerElement lastOpenChild | |
| nextOpen | back to summary |
|---|---|
| private ContainerElement nextOpen | |
| nsUri | back to summary |
|---|---|
| private final String nsUri Namespace URI of this element. | |
| parent | back to summary |
|---|---|
| private final ContainerElement parent | |
| prevOpen | back to summary |
|---|---|
| private ContainerElement prevOpen Uncommitted | |
| startTag | back to summary |
|---|---|
| pack-priv StartTag startTag Initially, point to the start tag token, but once we know we are done with the start tag, we will reset it to null so that the token sequence can be GC-ed. | |
| tail | back to summary |
|---|---|
| private Content tail When this element can accept more child content, this value
is non-null and holds the last child | |
| ContainerElement | back to summary |
|---|---|
| public ContainerElement(Document document, ContainerElement parent, String nsUri, String localName) | |
| _attribute | back to summary |
|---|---|
| public void _attribute(String localName, Object value) Implements com. Doc from com. Adds an attribute of the given name and the value. Short for _attribute("",localName,value);
| |
| _attribute | back to summary |
|---|---|
| public void _attribute(String nsUri, String localName, Object value) Implements com. Doc from com. Adds an attribute of the given name and the value. Short for _attribute(new QName(nsUri,localName),value);
| |
| _attribute | back to summary |
|---|---|
| public void _attribute(QName attributeName, Object value) Implements com. Doc from com. Adds an attribute of the given name and the value.
| |
| _cast | back to summary |
|---|---|
| public <T extends TypedXmlWriter> T _cast(Class<T> facadeType) Implements com. Doc from com. Returns a different interface for this typed XML Writer. Semantically, this operation is a 'cast' --- it returns the same underlying writer in a different interface. The returned new writer and the current writer will write to the same element. But this is different from Java's ordinary cast because the returned object is not always the same as the current object.
| |
| _cdata | back to summary |
|---|---|
| public void _cdata(Object value) Implements com. Doc from com. Appends CDATA section.
| |
| _comment | back to summary |
|---|---|
| public void _comment(Object value) throws UnsupportedOperationException Implements com. Doc from com. Appends a comment.
| |
| _commit | back to summary |
|---|---|
| private void _commit(boolean includingAllPredecessors) | |
| _element | back to summary |
|---|---|
| public <T extends TypedXmlWriter> T _element(String localName, Class<T> contentModel) Implements com. Doc from com. Appends a new child element. Short for _element(URI of this element,localName,contentModel); The namespace URI will be inherited from the parent element.
| |
| _element | back to summary |
|---|---|
| public <T extends TypedXmlWriter> T _element(QName tagName, Class<T> contentModel) Implements com. Doc from com. Appends a new child element. Short for _element(tagName.getNamespaceURI(),tagName.getLocalPart(),contentModel);
| |
| _element | back to summary |
|---|---|
| public <T extends TypedXmlWriter> T _element(Class<T> contentModel) Implements com. Doc from com. Appends a new child element.
This version of the _element method requires the T class to be
annotated with
| |
| _element | back to summary |
|---|---|
| public <T extends TypedXmlWriter> T _element(String nsUri, String localName, Class<T> contentModel) Implements com. Doc from com. Appends a new child element. The newly created child element is appended at the end of the children.
| |
| _namespace | back to summary |
|---|---|
| public void _namespace(String uri) Implements com. Doc from com. Declares a new namespace URI on this element. The runtime system will assign an unique prefix for the URI.
| |
| _namespace | back to summary |
|---|---|
| public void _namespace(String uri, String prefix) Implements com. Doc from com. Declares a new namespace URI on this element to a specific prefix.
| |
| _namespace | back to summary |
|---|---|
| public void _namespace(String uri, boolean requirePrefix) Implements com. Doc from com. Declares a new namespace URI on this element. The runtime system will assign an unique prefix for the URI.
| |
| _pcdata | back to summary |
|---|---|
| public void _pcdata(Object value) Implements com. Doc from com. Appends text data.
| |
| addAttribute | back to summary |
|---|---|
| private void addAttribute(XmlAttribute xa, Method method, Object[] args) Writes an attribute. | |
| addChild | back to summary |
|---|---|
| private void addChild(Content child) Appends this child object to the tail. | |
| addElement | back to summary |
|---|---|
| private Object addElement(XmlElement e, Method method, Object[] args) Writes a new element.
| |
| block | back to summary |
|---|---|
| public void block() Implements com. Doc from com. Blocks the writing of the start tag so that new attributes can be added even after child elements are appended.
This blocks the output at the token before the start tag until
the For more information, see the TXW documentation.
| |
| checkStartTag | back to summary |
|---|---|
| private void checkStartTag() | |
| commit | back to summary |
|---|---|
| public void commit() Implements com. Doc from com. Commits this element (and all its descendants) to the output.
Short for
| |
| commit | back to summary |
|---|---|
| public void commit(boolean includingAllPredecessors) Implements com. Doc from com. Commits this element (and all its descendants) to the output. Once a writer is committed, nothing can be added to it further. Committing allows TXW to output a part of the document even if the rest has not yet been written.
| |
| getDocument | back to summary |
|---|---|
| public Document getDocument() Implements com. Doc from com. Gets the
| |
| getNamespace | back to summary |
|---|---|
| private String getNamespace(Package pkg) Decides the namespace URI of the given package. | |
| invoke | back to summary |
|---|---|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
| |
| isBlocked | back to summary |
|---|---|
| pack-priv boolean isBlocked() | |
| isCommitted | back to summary |
|---|---|
| private boolean isCommitted() | |
| isRoot | back to summary |
|---|---|
| private boolean isRoot() | |