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 protectedBuilder() -
Method Summary
Modifier and Type Method Description @NonNull GsonConfigurationLoaderbuild()Builds the loader.intgetIndent()Gets the level of indentation to be used by the resultant loader.booleanisLenient()Gets if the resultant loader should parse leniently.@NonNull GsonConfigurationLoader.BuildersetIndent(int indent)Sets the level of indentation the resultant loader should use.@NonNull GsonConfigurationLoader.BuildersetLenient(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
-
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.BuilderBuilds the loader.- Specified by:
buildin classAbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder>- Returns:
- The loader
-