public static class YamlConfig.WriteConfig extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
setAutoAnchor(boolean autoAnchor)
If true, values that are referenced multiple times will use an anchor.
|
void |
setCanonical(boolean canonical)
If true, the YAML output will be canonical.
|
void |
setEscapeUnicode(boolean escapeUnicode)
If false, unicode characters will be output instead of the escaped unicode character code.
|
void |
setExplicitEndDocument(boolean explicitEndDocument)
If true, the every document will have a document end token (...).
|
void |
setExplicitFirstDocument(boolean explicitFirstDocument)
If true, the first document will have a document start token (---).
|
void |
setIndentSize(int indentSize)
Sets the number of spaces to indent.
|
void |
setKeepBeanPropertyOrder(boolean keepBeanPropertyOrder)
If true, bean fields/properties are written in the same order as the fields are defined in the bean class.
|
void |
setQuoteChar(YamlConfig.Quote quote)
The type of quotes to use when writing YAML output.
|
void |
setUseVerbatimTags(boolean useVerbatimTags)
If false, tags will never be surrounded by angle brackets (eg, "!<java.util.LinkedList>").
|
void |
setVersion(Version version)
Sets the YAML version to output.
|
void |
setWrapColumn(int wrapColumn)
Sets the column at which values will attempt to wrap.
|
void |
setWriteClassname(YamlConfig.WriteClassName write)
based on Ennumeration parameter, class name tags will be output.
|
void |
setWriteDefaultValues(boolean writeDefaultValues)
If false, object fields with default values will not be written.
|
void |
setWriteRootElementTags(boolean writeRootElementTags)
If true, the elements of a Collection or Map root for each YAML document will have a tag defining the class that was
written, if necessary.
|
void |
setWriteRootTags(boolean writeRootTags)
If true, the root of each YAML document will have a tag defining the class that was written, if necessary.
|
public void setExplicitFirstDocument(boolean explicitFirstDocument)
public void setExplicitEndDocument(boolean explicitEndDocument)
public void setWriteRootTags(boolean writeRootTags)
ArrayList, or HashMap. It is useful to set this to false when
planning to read the object with the YamlReader.read(Class) method. Default is true.public void setWriteRootElementTags(boolean writeRootElementTags)
ArrayList, or HashMap. It is
useful to set this to false when planning to read the object with the YamlReader.read(Class, Class) method.
Default is true.public void setWriteDefaultValues(boolean writeDefaultValues)
public void setAutoAnchor(boolean autoAnchor)
YamlWriter.write(Object)). When true, objects are not actually written until
YamlWriter.clearAnchors() or YamlWriter.close() is called. If changing auto anchor to false,
YamlWriter.clearAnchors() should be called first to output any buffered objects. Default is true.public void setKeepBeanPropertyOrder(boolean keepBeanPropertyOrder)
public void setVersion(Version version)
public void setCanonical(boolean canonical)
public void setIndentSize(int indentSize)
public void setWrapColumn(int wrapColumn)
public void setUseVerbatimTags(boolean useVerbatimTags)
public void setEscapeUnicode(boolean escapeUnicode)
public void setWriteClassname(YamlConfig.WriteClassName write)
public void setQuoteChar(YamlConfig.Quote quote)
Copyright © 2020. All rights reserved.