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 protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 Detail
-
Builder
protected Builder()
-
-
Method Detail
-
getFactory
public @NonNull JsonFactory getFactory()
Gets theJsonFactoryused 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.BuilderBuilds the loader.- Specified by:
buildin classAbstractConfigurationLoader.Builder<JSONConfigurationLoader.Builder>- Returns:
- The loader
-
-