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 aJSONConfigurationLoader
.
-
-
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
All Methods Instance Methods Concrete Methods 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 Detail
-
Builder
protected Builder()
-
-
Method Detail
-
getFactory
public @NonNull JsonFactory getFactory()
Gets theJsonFactory
used to configure the implementation.- Returns:
- The json factory
-
setIndent
public @NonNull JSONConfigurationLoader.Builder setIndent(int indent)
Sets the level of indentation the resultant loader should use.- Parameters:
indent
- The indent level- Returns:
- This builder (for chaining)
-
getIndent
public int 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
public @NonNull FieldValueSeparatorStyle getFieldValueSeparatorStyle()
Gets the field value separator style to be used by the resultant loader.- Returns:
- The style
-
build
public @NonNull JSONConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>
- Returns:
- The loader
-
-