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 protectedBuilder() -
Method Summary
Modifier and Type Method Description @NonNull JSONConfigurationLoaderbuild()Builds the loader.@NonNull JsonFactorygetFactory()Gets theJsonFactoryused to configure the implementation.@NonNull FieldValueSeparatorStylegetFieldValueSeparatorStyle()Gets the field value separator style to be used by the resultant loader.intgetIndent()Gets the level of indentation to be used by the resultant loader.@NonNull JSONConfigurationLoader.BuildersetFieldValueSeparatorStyle(@NonNull FieldValueSeparatorStyle style)Sets the field value separator style the resultant loader should use.@NonNull JSONConfigurationLoader.BuildersetIndent(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 theJsonFactoryused 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.BuilderBuilds the loader.- Specified by:
buildin classAbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>- Returns:
- The loader
-