Class GsonConfigurationLoader.Builder
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder,GsonConfigurationLoader>
-
- org.spongepowered.configurate.gson.GsonConfigurationLoader.Builder
-
- Enclosing class:
- GsonConfigurationLoader
public static final class GsonConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder,GsonConfigurationLoader>
Builds aGsonConfigurationLoader.- Since:
- 4.0.0
-
-
Field Summary
-
Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, headerMode, sink, source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull GsonConfigurationLoaderbuild()Builds the loader.intindent()Gets the level of indentation to be used by the resultant loader.@NonNull GsonConfigurationLoader.Builderindent(int indent)Sets the level of indentation the resultant loader should use.booleanlenient()Gets if the resultant loader should parse leniently.@NonNull GsonConfigurationLoader.Builderlenient(boolean lenient)Sets if the resultant loader should parse leniently.-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
buildAndLoadString, buildAndSaveString, defaultOptions, defaultOptions, defaultOptions, file, headerMode, headerMode, path, sink, sink, source, source, url
-
-
-
-
Method Detail
-
indent
public @NonNull GsonConfigurationLoader.Builder indent(int indent)
Sets the level of indentation the resultant loader should use.- Parameters:
indent- the indent level- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
-
indent
public int indent()
Gets the level of indentation to be used by the resultant loader.- Returns:
- the indent level
- Since:
- 4.0.0
-
lenient
public @NonNull GsonConfigurationLoader.Builder lenient(boolean lenient)
Sets if the resultant loader should parse leniently.- Parameters:
lenient- whether the parser should parse leniently- Returns:
- this builder (for chaining)
- Since:
- 4.0.0
- See Also:
JsonReader.setLenient(boolean)
-
lenient
public boolean lenient()
Gets if the resultant loader should parse leniently.- Returns:
- whether the parser should parse leniently
- Since:
- 4.0.0
-
build
public @NonNull GsonConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.BuilderBuilds the loader.- Specified by:
buildin classAbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder,GsonConfigurationLoader>- Returns:
- a new loader
-
-