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 a
JacksonConfigurationLoader
.
This builder supports the following options:
- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.kyori.option.Option<FieldValueSeparatorStyle>
Set the field-value separator style to be used when emitting json.static final net.kyori.option.Option<Integer>
Set the indentation to when emitting json.static final net.kyori.option.OptionSchema
A schema of options available to configure the Jackson loader.Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, HEADER_MODE, headerMode, sink, source
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the loader.Gets theJsonFactory
used to configure the implementation.Gets the field value separator style to be used by the built loader.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.indent
(int indent) Sets the level of indentation the resultant loader should use.protected net.kyori.option.OptionSchema
Get the schema of available options that can be set on this loader.Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
buildAndLoadString, buildAndSaveString, defaultOptions, defaultOptions, defaultOptions, editOptions, file, headerMode, headerMode, optionState, optionState, optionStateBuilder, path, sink, sink, source, source, url
-
Field Details
-
SCHEMA
A schema of options available to configure the Jackson loader.- Since:
- 4.2.0
-
INDENT
Set the indentation to when emitting json.- Since:
- 4.2.0
- See Also:
-
FIELD_VALUE_SEPARATOR
Set the field-value separator style to be used when emitting json.- Since:
- 4.2.0
- See Also:
-
-
Method Details
-
optionSchema
Description copied from class:AbstractConfigurationLoader.Builder
Get the schema of available options that can be set on this loader.This schema should inherit from
AbstractConfigurationLoader.Builder.UNSAFE_SCHEMA
.- Overrides:
optionSchema
in classAbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,
JacksonConfigurationLoader> - Returns:
- the option schema
-
factoryBuilder
Gets theJsonFactory
used to configure the implementation.- Returns:
- the json factory
- Since:
- 4.0.0
-
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
Gets the level of indentation to be used by the resultant loader.- Returns:
- the indent level
- Since:
- 4.0.0
-
fieldValueSeparatorStyle
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
Gets the field value separator style to be used by the built loader.- Returns:
- the style
- Since:
- 4.0.0
-
build
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<JacksonConfigurationLoader.Builder,
JacksonConfigurationLoader> - Returns:
- a new loader
-