Deprecated
as a consequence of ExtendedHierarchicalStreamWriter being deprecated. See corresponding docs for further information.
HierarchicalStreamWriter should rather be derived from this class then implementing
the interface directly.
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractWriter(NameCoder
the name coder used to write names in the target format nameCoder)Creates an AbstractWriter with a provided |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the name in the target formatthe original name name)Encode the attribute name into the name of the target format. |
| public String | Returns: the name in the target formatthe original name name)Encode the node name into the name of the target format. |
| public void | startNode(String name, Class<T> clazz)
Implements com. |
| public HierarchicalStreamWriter | underlyingWriter()
Implements com. |
| nameCoder | back to summary |
|---|---|
| private NameCoder nameCoder | |
| AbstractWriter | back to summary |
|---|---|
| protected AbstractWriter() Creates an AbstractWriter with a NameCoder that does nothing.
| |
| AbstractWriter | back to summary |
|---|---|
| protected AbstractWriter(NameCoder nameCoder) Creates an AbstractWriter with a provided
| |
| encodeAttribute | back to summary |
|---|---|
| public String encodeAttribute(String name) Encode the attribute name into the name of the target format. | |
| encodeNode | back to summary |
|---|---|
| public String encodeNode(String name) Encode the node name into the name of the target format. | |
| startNode | back to summary |
|---|---|
| public void startNode(String name, Class<T> clazz) Implements com. | |
| underlyingWriter | back to summary |
|---|---|
| public HierarchicalStreamWriter underlyingWriter() Implements com. Doc from com. Return the underlying HierarchicalStreamWriter implementation. If a Converter needs to access methods of a specific HierarchicalStreamWriter implementation that are not defined in the HierarchicalStreamWriter interface, it should call this method before casting. This is because the writer passed to the Converter is often wrapped/decorated by another implementation to provide additional functionality (such as XPath tracking). For example: MySpecificWriter mySpecificWriter = (MySpecificWriter)writer; // INCORRECT! mySpecificWriter.doSomethingSpecific(); MySpecificWriter mySpecificWriter = (MySpecificWriter)writer.underlyingWriter(); // CORRECT! mySpecificWriter.doSomethingSpecific(); Implementations of HierarchicalStreamWriter should return 'this', unless they are a decorator, in which case they should delegate to whatever they are wrapping. | |