| Modifier and Type | Field and Description |
|---|---|
| private AnchorGenerator | |
| private String | |
| private boolean | |
| pack-priv Map | |
| private FlowStyle | |
| private ScalarStyle | |
| private boolean | |
| private boolean | |
| private boolean | |
| private Optional | |
| private boolean | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private boolean | |
| private NonPrintableStyle | |
| private Schema | |
| private boolean | |
| private Map | |
| private boolean | |
| private int | |
| private Optional |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public DumpSettings | |
| public DumpSettingsBuilder | Returns: the builder with the provided value- specified function to create anchor names anchorGenerator)Define anchor name generator (by default 'id' + number) |
| public DumpSettingsBuilder | Returns: the builder with the provided value- "\r\n" or "\n" bestLineBreak)If the YAML is created for another platform (for instance on Windows to be consumed under Linux) than this setting is used to define the line ending. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- specify if the canonical representation must be used canonical)Enforce canonical representation |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the key key, Object - the value behind the key value)Custom property is the way to give some runtime parameters to be used during dumping |
| public DumpSettingsBuilder | Returns: the builder with the provided value- specify the style defaultFlowStyle)Define flow style |
| public DumpSettingsBuilder | Returns: the builder with the provided value- specify the scalar style defaultScalarStyle)Define default scalar style |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true to use copies of objects instead of references to the same
instance dereferenceAliases)Disable usage of anchors and aliases while serialising an instance. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true when comments should be dumped (serialised) dumpComments)Set to true to add comments from Nodes to |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true if the document end must be explicitly indicated explicitEnd)Add '...' in the end of the document |
| public DumpSettingsBuilder | Returns: the builder with the provided value- specify the root tag explicitRootTag)Define root |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true if the document start must be explicitly indicated explicitStart)Add '---' in the beginning of the document |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the number of spaces. Must be within the range
org.snakeyaml.engine.v2.emitter.Emitter.MIN_INDENT and
org.snakeyaml.engine.v2.emitter.Emitter.MAX_INDENT indent)Define the amount of the spaces for the indent in the block flow style. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true when indent for sequences is added to general indentWithIndicator)Set to true to add the indent for sequences to the general indent |
| public DumpSettingsBuilder | Returns: the builder with the provided value- must be non-negative and less than
org.snakeyaml.engine.v2.emitter.Emitter.MAX_INDENT - 1 indicatorIndent)It adds the specified indent for sequence indicator in the block flow. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the limit after which the key gets explicit key indicator '?' maxSimpleKeyLength)Define max key length to use simple key (without '?'). |
| public DumpSettingsBuilder | Returns: the builder with the provided value- set false to output all values in a single line. multiLineFlow)Use pretty flow style when every value in the flow context gets a separate line. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- set this to BINARY to force non-printable String to represented as
binary (byte array) nonPrintableStyle)When String object contains non-printable characters, they are escaped with \\u or \\x notation. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the tag schema schema)Provide either recommended or custom
schema instead of
default |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true to split long lines splitLines)Define whether to split long lines |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the data to create TAG directive tagDirective)Add TAG directive |
| public DumpSettingsBuilder | Returns: the builder with the provided value- true to use Unicode for "Я", false to use "Ч" for the same
char (if useUnicodeEncoding is false then all non-ASCII characters are escaped) useUnicodeEncoding)Specify whether to emit non-ASCII printable Unicode characters (emit Unicode char or escape sequence starting with '\\u') The default value is true. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the width width)Set max width for literal scalars. |
| public DumpSettingsBuilder | Returns: the builder with the provided value- the version to be used in the directive yamlDirective)Add YAML directive |
| anchorGenerator | back to summary |
|---|---|
| private AnchorGenerator anchorGenerator | |
| bestLineBreak | back to summary |
|---|---|
| private String bestLineBreak | |
| canonical | back to summary |
|---|---|
| private boolean canonical | |
| customProperties | back to summary |
|---|---|
| pack-priv Map<SettingKey, Object> customProperties | |
| defaultFlowStyle | back to summary |
|---|---|
| private FlowStyle defaultFlowStyle | |
| defaultScalarStyle | back to summary |
|---|---|
| private ScalarStyle defaultScalarStyle | |
| dereferenceAliases | back to summary |
|---|---|
| private boolean dereferenceAliases | |
| dumpComments | back to summary |
|---|---|
| private boolean dumpComments | |
| explicitEnd | back to summary |
|---|---|
| private boolean explicitEnd | |
| explicitRootTag | back to summary |
|---|---|
| private Optional<Tag> explicitRootTag | |
| explicitStart | back to summary |
|---|---|
| private boolean explicitStart | |
| indent | back to summary |
|---|---|
| private int indent | |
| indentWithIndicator | back to summary |
|---|---|
| private boolean indentWithIndicator | |
| indicatorIndent | back to summary |
|---|---|
| private int indicatorIndent | |
| maxSimpleKeyLength | back to summary |
|---|---|
| private int maxSimpleKeyLength | |
| multiLineFlow | back to summary |
|---|---|
| private boolean multiLineFlow | |
| nonPrintableStyle | back to summary |
|---|---|
| private NonPrintableStyle nonPrintableStyle | |
| schema | back to summary |
|---|---|
| private Schema schema | |
| splitLines | back to summary |
|---|---|
| private boolean splitLines | |
| tagDirective | back to summary |
|---|---|
| private Map<String, String> tagDirective | |
| useUnicodeEncoding | back to summary |
|---|---|
| private boolean useUnicodeEncoding | |
| width | back to summary |
|---|---|
| private int width | |
| yamlDirective | back to summary |
|---|---|
| private Optional<SpecVersion> yamlDirective | |
| DumpSettingsBuilder | back to summary |
|---|---|
| pack-priv DumpSettingsBuilder() Create builder | |
| build | back to summary |
|---|---|
| public DumpSettings build() Create immutable DumpSettings
| |
| setAnchorGenerator | back to summary |
|---|---|
| public DumpSettingsBuilder setAnchorGenerator(AnchorGenerator anchorGenerator) Define anchor name generator (by default 'id' + number)
| |
| setBestLineBreak | back to summary |
|---|---|
| public DumpSettingsBuilder setBestLineBreak(String bestLineBreak) If the YAML is created for another platform (for instance on Windows to be consumed under Linux) than this setting is used to define the line ending. The platform line end is used by default.
| |
| setCanonical | back to summary |
|---|---|
| public DumpSettingsBuilder setCanonical(boolean canonical) Enforce canonical representation
| |
| setCustomProperty | back to summary |
|---|---|
| public DumpSettingsBuilder setCustomProperty(SettingKey key, Object value) Custom property is the way to give some runtime parameters to be used during dumping
| |
| setDefaultFlowStyle | back to summary |
|---|---|
| public DumpSettingsBuilder setDefaultFlowStyle(FlowStyle defaultFlowStyle) Define flow style
| |
| setDefaultScalarStyle | back to summary |
|---|---|
| public DumpSettingsBuilder setDefaultScalarStyle(ScalarStyle defaultScalarStyle) Define default scalar style
| |
| setDereferenceAliases | back to summary |
|---|---|
| public DumpSettingsBuilder setDereferenceAliases(Boolean dereferenceAliases) Disable usage of anchors and aliases while serialising an instance. Recursive objects will not work when they are disabled. (Forces Serializer to skip emitting anchors names, emit Node content instead of Alias, fail with SerializationException if serialized structure is recursive.)
| |
| setDumpComments | back to summary |
|---|---|
| public DumpSettingsBuilder setDumpComments(boolean dumpComments) Set to true to add comments from Nodes to
| |
| setExplicitEnd | back to summary |
|---|---|
| public DumpSettingsBuilder setExplicitEnd(boolean explicitEnd) Add '...' in the end of the document
| |
| setExplicitRootTag | back to summary |
|---|---|
| public DumpSettingsBuilder setExplicitRootTag(Optional<Tag> explicitRootTag) Define root
| |
| setExplicitStart | back to summary |
|---|---|
| public DumpSettingsBuilder setExplicitStart(boolean explicitStart) Add '---' in the beginning of the document
| |
| setIndent | back to summary |
|---|---|
| public DumpSettingsBuilder setIndent(int indent) Define the amount of the spaces for the indent in the block flow style. Default is 2.
| |
| setIndentWithIndicator | back to summary |
|---|---|
| public DumpSettingsBuilder setIndentWithIndicator(boolean indentWithIndicator) Set to true to add the indent for sequences to the general indent
| |
| setIndicatorIndent | back to summary |
|---|---|
| public DumpSettingsBuilder setIndicatorIndent(int indicatorIndent) It adds the specified indent for sequence indicator in the block flow. Default is 0. For better visual results it should be by 2 less than the indent (which is 2 by default) It is 2 chars less because the first char is '-' and the second char is the space after it.
| |
| setMaxSimpleKeyLength | back to summary |
|---|---|
| public DumpSettingsBuilder setMaxSimpleKeyLength(int maxSimpleKeyLength) Define max key length to use simple key (without '?'). More info
| |
| setMultiLineFlow | back to summary |
|---|---|
| public DumpSettingsBuilder setMultiLineFlow(boolean multiLineFlow) Use pretty flow style when every value in the flow context gets a separate line.
| |
| setNonPrintableStyle | back to summary |
|---|---|
| public DumpSettingsBuilder setNonPrintableStyle(NonPrintableStyle nonPrintableStyle) When String object contains non-printable characters, they are escaped with \\u or \\x notation. Sometimes it is better to transform this data to binary (with the !!binary tag). String objects with printable data are non affected by this setting.
| |
| setSchema | back to summary |
|---|---|
| public DumpSettingsBuilder setSchema(Schema schema) Provide either recommended or custom
schema instead of
default
| |
| setSplitLines | back to summary |
|---|---|
| public DumpSettingsBuilder setSplitLines(boolean splitLines) Define whether to split long lines
| |
| setTagDirective | back to summary |
|---|---|
| public DumpSettingsBuilder setTagDirective(Map<String, String> tagDirective) Add TAG directive
| |
| setUseUnicodeEncoding | back to summary |
|---|---|
| public DumpSettingsBuilder setUseUnicodeEncoding(boolean useUnicodeEncoding) Specify whether to emit non-ASCII printable Unicode characters (emit Unicode char or escape sequence starting with '\\u') The default value is true. When set to false then printable non-ASCII characters (Cyrillic, Chinese etc) will be not printed but escaped (to support ASCII terminals)
| |
| setWidth | back to summary |
|---|---|
| public DumpSettingsBuilder setWidth(int width) Set max width for literal scalars. When the scalar representation takes more then the preferred with the scalar will be split into a few lines. The default is 80.
| |
| setYamlDirective | back to summary |
|---|---|
| public DumpSettingsBuilder setYamlDirective(Optional<SpecVersion> yamlDirective) Add YAML directive
| |