Note that only a subset of methods of PrettyPrinter actually
get called by ToXmlGenerator; because of this, implementation
is bit briefer (and uglier...).
| Modifier and Type | Class and Description |
|---|---|
| protected static class | DefaultXmlPrettyPrinter.FixedSpaceIndenter
This is a very simple indenter that only every adds a single space for indentation. |
| public static interface | DefaultXmlPrettyPrinter.Indenter
Interface that defines objects that can produce indentation used to separate object entries and array values. |
| protected class | DefaultXmlPrettyPrinter.Lf2SpacesIndenter
Default linefeed-based indenter uses system-specific linefeeds and 2 spaces for indentation per level. |
| protected static class | DefaultXmlPrettyPrinter.NopIndenter
Dummy implementation that adds no indentation whatsoever |
| Modifier and Type | Field and Description |
|---|---|
| protected DefaultXmlPrettyPrinter. | _arrayIndenter
By default, let's use only spaces to separate array values. |
| protected transient boolean | _justHadStartElement
Marker flag set on start element, and cleared if an end element is encountered. |
| protected transient int | _nesting
Number of open levels of nesting. |
| protected String | |
| protected DefaultXmlPrettyPrinter. | _objectIndenter
By default, let's use linefeed-adding indenter for separate object entries. |
| private static final long | |
| pack-priv static final int | |
| pack-priv static final char[] | |
| private static final String | SYSTEM_DEFAULT_NEW_LINE
By default, will try to set as System.getProperty("line.separator"). |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | beforeArrayValues(JsonGenerator
Generator used for output gen)Implements com. |
| public void | beforeObjectEntries(JsonGenerator
Generator used for output gen)Implements com. |
| public DefaultXmlPrettyPrinter | createInstance()
Implements com. |
| public void | |
| public void | |
| public DefaultXmlPrettyPrinter | |
| public void | writeArrayValueSeparator(JsonGenerator
Generator used for output gen)Implements com. |
| public void | writeEndArray(JsonGenerator
Generator used for output gen, int Number of direct members of the array that
have been output nrOfValues)Implements com. |
| public void | writeEndElement(XMLStreamWriter2 sw, int nrOfEntries)
Implements com. |
| public void | writeEndObject(JsonGenerator
Generator used for output gen, int Number of direct members of the Object that
have been output nrOfEntries)Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, String text, boolean isCData)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, char[] buffer, int offset, int len, boolean isCData)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, boolean value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, int value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, long value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, double value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, float value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, BigInteger value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, BigDecimal value)
Implements com. |
| public void | writeLeafElement(XMLStreamWriter2 sw, String nsURI, String localName, Base64Variant base64variant, byte[] data, int offset, int len)
Implements com. |
| public void | writeLeafNullElement(XMLStreamWriter2 sw, String nsURI, String localName)
Implements com. |
| public void | |
| public void | writeObjectEntrySeparator(JsonGenerator
Generator used for output gen)Implements com. |
| public void | writeObjectFieldValueSeparator(JsonGenerator
Generator used for output gen)Implements com. |
| public void | writePrologLinefeed(XMLStreamWriter2 sw)
Implements com. |
| public void | writeRootValueSeparator(JsonGenerator
Generator used for output gen)Implements com. |
| public void | writeStartArray(JsonGenerator
Generator used for output gen)Implements com. |
| public void | writeStartElement(XMLStreamWriter2 sw, String nsURI, String localName)
Implements com. |
| public void | writeStartObject(JsonGenerator
Generator used for output gen)Implements com. |