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 aGsonConfigurationLoader
.
-
-
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 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 Detail
-
Builder
protected Builder()
-
-
Method Detail
-
setIndent
public @NonNull GsonConfigurationLoader.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
-
setLenient
public @NonNull GsonConfigurationLoader.Builder setLenient(boolean lenient)
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
public boolean isLenient()
Gets if the resultant loader should parse leniently.- Returns:
- Whether the parser should parse leniently
-
build
public @NonNull GsonConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder>
- Returns:
- The loader
-
-