Package ninja.leaping.configurate.gson
Class GsonConfigurationLoader.Builder
java.lang.Object
ninja.leaping.configurate.loader.AbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder>
ninja.leaping.configurate.gson.GsonConfigurationLoader.Builder
- Enclosing class:
- GsonConfigurationLoader
public static class GsonConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder>
Builds a
GsonConfigurationLoader
.-
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 GsonConfigurationLoader
build()
Builds the loader.int
getIndent()
Gets the level of indentation to be used by the resultant loader.boolean
isLenient()
Gets if the resultant loader should parse leniently.@NonNull GsonConfigurationLoader.Builder
setIndent(int indent)
Sets the level of indentation the resultant loader should use.@NonNull GsonConfigurationLoader.Builder
setLenient(boolean lenient)
Sets if the resultant loader should parse leniently.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
-
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
-
setLenient
Sets if the resultant loader should parse leniently.- Parameters:
lenient
- Whether the parser should parse leniently- Returns:
- This builder (for chaining)
- See Also:
JsonReader.setLenient(boolean)
-
isLenient
Gets if the resultant loader should parse leniently.- Returns:
- Whether the parser should parse leniently
-
build
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder>
- Returns:
- The loader
-