Class SnakeYamlOptions.Builder
java.lang.Object
space.arim.dazzleconf.ext.snakeyaml.SnakeYamlOptions.Builder
- Enclosing class:
- SnakeYamlOptions
Builder of
SnakeYamlOptions
- Author:
- A248
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the options.Sets the character encoding used by the factory.commentMode(CommentMode commentMode)
Sets the comment mode used for writing comments.toString()
useCommentingWriter(boolean useCommentingWriter)
Deprecated.Comments are now handled via the comment mode.yamlSupplier(Supplier<org.yaml.snakeyaml.Yaml> yamlSupplier)
Sets theYaml
supplier for this builder to the specified one.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
yamlSupplier
Sets theYaml
supplier for this builder to the specified one. The default is a supplier which returns aYaml
instance with block flow style.- Parameters:
yamlSupplier
- the yaml supplier- Returns:
- this builder
-
commentMode
Sets the comment mode used for writing comments. The available modes are obtainable via static factory methods inCommentMode
- Parameters:
commentMode
- the comment mode to use- Returns:
- this builder
-
useCommentingWriter
Deprecated.Comments are now handled via the comment mode. UsecommentMode(CommentMode)
withCommentMode.alternativeWriter()
to replace 'true' calls to this method.SnakeYaml does not support writing comments. This option enables an alternative yaml writer implementation which has the ability to write comments before each entry. False by default.
With this option disabled, only the comment header on the top level configuration is written.- Parameters:
useCommentingWriter
- true to use the commenting alternate writer, false otherwise- Returns:
- this builder
-
charset
Sets the character encoding used by the factory. Default is UTF 8- Parameters:
charset
- the charset- Returns:
- this builder
-
build
Builds the options. May be used repeatedly without side effects- Returns:
- the built options
-
toString
-