Class JacksonConfigurationLoader.Builder
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,JacksonConfigurationLoader>
-
- org.spongepowered.configurate.jackson.JacksonConfigurationLoader.Builder
-
- Enclosing class:
- JacksonConfigurationLoader
public static final class JacksonConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,JacksonConfigurationLoader>
Builds aJacksonConfigurationLoader
.This builder supports the following options:
- <prefix>.jackson.field-value-separator
- Equivalent to
fieldValueSeparatorStyle(FieldValueSeparatorStyle)
- <prefix>.jackson.indent
- Equivalent to
indent(int)
- Since:
- 4.0.0
-
-
Field Summary
-
Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
DEFAULT_OPTIONS_SOURCE, defaultOptions, headerMode, sink, source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JacksonConfigurationLoader
build()
Builds the loader.JsonFactoryBuilder
factoryBuilder()
Gets theJsonFactory
used to configure the implementation.FieldValueSeparatorStyle
fieldValueSeparatorStyle()
Gets the field value separator style to be used by the built loader.JacksonConfigurationLoader.Builder
fieldValueSeparatorStyle(FieldValueSeparatorStyle style)
Sets the field value separator style the resultant loader should use.int
indent()
Gets the level of indentation to be used by the resultant loader.JacksonConfigurationLoader.Builder
indent(int indent)
Sets the level of indentation the resultant loader should use.protected void
populate(LoaderOptionSource options)
Populate options from the provided source.-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
buildAndLoadString, buildAndSaveString, defaultOptions, defaultOptions, defaultOptions, file, from, headerMode, headerMode, path, sink, sink, source, source, url
-
-
-
-
Method Detail
-
populate
protected void populate(LoaderOptionSource options)
Description copied from class:AbstractConfigurationLoader.Builder
Populate options from the provided source.The source will have already been validated for nullness.
- Overrides:
populate
in classAbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,JacksonConfigurationLoader>
- Parameters:
options
- the options to read
-
factoryBuilder
public JsonFactoryBuilder factoryBuilder()
Gets theJsonFactory
used to configure the implementation.- Returns:
- the json factory
- Since:
- 4.0.0
-
indent
public JacksonConfigurationLoader.Builder indent(int indent)
Sets the level of indentation the resultant loader should use.- Parameters:
indent
- the indent level- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
-
indent
public int indent()
Gets the level of indentation to be used by the resultant loader.- Returns:
- the indent level
- Since:
- 4.0.0
-
fieldValueSeparatorStyle
public JacksonConfigurationLoader.Builder fieldValueSeparatorStyle(FieldValueSeparatorStyle style)
Sets the field value separator style the resultant loader should use.- Parameters:
style
- the style- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
-
fieldValueSeparatorStyle
public FieldValueSeparatorStyle fieldValueSeparatorStyle()
Gets the field value separator style to be used by the built loader.- Returns:
- the style
- Since:
- 4.0.0
-
build
public JacksonConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,JacksonConfigurationLoader>
- Returns:
- a new loader
-
-