Package ninja.leaping.configurate.json
Class JSONConfigurationLoader.Builder
java.lang.Object
ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>
ninja.leaping.configurate.json.JSONConfigurationLoader.Builder
- Enclosing class:
- JSONConfigurationLoader
public static class JSONConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>
Builds a
JSONConfigurationLoader
.-
Field Summary
Fields inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, headerMode, sink, source
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
Modifier and Type Method Description @NonNull JSONConfigurationLoader
build()
Builds the loader.@NonNull JsonFactory
getFactory()
Gets theJsonFactory
used to configure the implementation.@NonNull FieldValueSeparatorStyle
getFieldValueSeparatorStyle()
Gets the field value separator style to be used by the resultant loader.int
getIndent()
Gets the level of indentation to be used by the resultant loader.@NonNull JSONConfigurationLoader.Builder
setFieldValueSeparatorStyle(@NonNull FieldValueSeparatorStyle style)
Sets the field value separator style the resultant loader should use.@NonNull JSONConfigurationLoader.Builder
setIndent(int indent)
Sets the level of indentation the resultant loader should use.Methods inherited from class ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder
getDefaultOptions, getHeaderMode, getSink, getSource, preservesHeader, setDefaultOptions, setDefaultOptions, setFile, setHeaderMode, setPath, setPreservesHeader, setSink, setSource, setURL
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
getFactory
Gets theJsonFactory
used to configure the implementation.- Returns:
- The json factory
-
setIndent
Sets the level of indentation the resultant loader should use.- Parameters:
indent
- The indent level- Returns:
- This builder (for chaining)
-
getIndent
Gets the level of indentation to be used by the resultant loader.- Returns:
- The indent level
-
setFieldValueSeparatorStyle
public @NonNull JSONConfigurationLoader.Builder setFieldValueSeparatorStyle(@NonNull FieldValueSeparatorStyle style)Sets the field value separator style the resultant loader should use.- Parameters:
style
- The style- Returns:
- This builder (for chaining)
-
getFieldValueSeparatorStyle
Gets the field value separator style to be used by the resultant loader.- Returns:
- The style
-
build
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>
- Returns:
- The loader
-