Class AbstractConfigurationWriter
java.lang.Object
org.infinispan.commons.configuration.io.AbstractConfigurationWriter
- All Implemented Interfaces:
AutoCloseable
,ConfigurationWriter
- Direct Known Subclasses:
JsonConfigurationWriter
,XmlConfigurationWriter
,YamlConfigurationWriter
- Since:
- 12.1
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commons.configuration.io.ConfigurationWriter
ConfigurationWriter.Builder
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected int
protected final NamingStrategy
protected final boolean
protected final Deque<AbstractConfigurationWriter.Tag>
protected final Writer
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractConfigurationWriter
(Writer writer, int indent, boolean prettyPrint, boolean clearTextSecrets, NamingStrategy naming) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
protected void
indent()
protected void
nl()
protected void
outdent()
protected void
tab()
void
void
writeAttribute
(Enum<?> name, boolean value) void
writeAttribute
(Enum<?> name, Iterable<String> value) void
writeAttribute
(Enum<?> name, String value) void
writeAttribute
(String name, boolean value) void
writeEmptyElement
(Enum<?> name) void
void
writeMapItem
(Enum<?> element, Enum<?> name, String key) void
writeMapItem
(Enum<?> element, Enum<?> name, String key, String value) void
writeStartArrayElement
(Enum<?> name) void
writeStartElement
(Enum<?> name) void
writeStartElement
(String prefix, String namespace, Enum<?> name) void
writeStartListElement
(Enum<?> name, boolean explicit) void
writeStartListElement
(String prefix, String namespace, Enum<?> name, boolean explicit) void
writeStartMap
(Enum<?> name) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commons.configuration.io.ConfigurationWriter
hasFeature, writeArrayElement, writeAttribute, writeAttribute, writeCharacters, writeComment, writeDefaultNamespace, writeEmptyElement, writeEndArrayElement, writeEndDocument, writeEndElement, writeEndMap, writeEndMapItem, writeMapItem, writeMapItem, writeNamespace, writeStartArrayElement, writeStartDocument, writeStartElement, writeStartElement, writeStartListElement, writeStartListElement, writeStartMap
-
Field Details
-
writer
-
tagStack
-
namespaces
-
currentIndent
protected int currentIndent -
prettyPrint
protected final boolean prettyPrint -
clearTextSecrets
protected final boolean clearTextSecrets -
naming
-
-
Constructor Details
-
AbstractConfigurationWriter
protected AbstractConfigurationWriter(Writer writer, int indent, boolean prettyPrint, boolean clearTextSecrets, NamingStrategy naming)
-
-
Method Details
-
clearTextSecrets
public boolean clearTextSecrets()- Specified by:
clearTextSecrets
in interfaceConfigurationWriter
-
writeStartElement
- Specified by:
writeStartElement
in interfaceConfigurationWriter
-
writeStartElement
- Specified by:
writeStartElement
in interfaceConfigurationWriter
-
writeStartArrayElement
- Specified by:
writeStartArrayElement
in interfaceConfigurationWriter
-
writeArrayElement
public void writeArrayElement(Enum<?> outer, Enum<?> inner, Enum<?> attribute, Iterable<String> values) - Specified by:
writeArrayElement
in interfaceConfigurationWriter
-
writeStartListElement
- Specified by:
writeStartListElement
in interfaceConfigurationWriter
-
writeStartListElement
- Specified by:
writeStartListElement
in interfaceConfigurationWriter
-
writeEndListElement
public void writeEndListElement()- Specified by:
writeEndListElement
in interfaceConfigurationWriter
-
writeAttribute
- Specified by:
writeAttribute
in interfaceConfigurationWriter
-
writeAttribute
- Specified by:
writeAttribute
in interfaceConfigurationWriter
-
writeAttribute
- Specified by:
writeAttribute
in interfaceConfigurationWriter
-
writeAttribute
- Specified by:
writeAttribute
in interfaceConfigurationWriter
-
writeEmptyElement
- Specified by:
writeEmptyElement
in interfaceConfigurationWriter
-
writeStartMap
- Specified by:
writeStartMap
in interfaceConfigurationWriter
-
writeMapItem
- Specified by:
writeMapItem
in interfaceConfigurationWriter
- See Also:
-
writeMapItem
- Specified by:
writeMapItem
in interfaceConfigurationWriter
-
nl
- Throws:
IOException
-
tab
- Throws:
IOException
-
indent
protected void indent() -
outdent
protected void outdent() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceConfigurationWriter
-