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>
- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.kyori.option.Option<Integer>
The level of indentation to be used by the resulting loader.static final net.kyori.option.Option<Boolean>
If the resultant loader should parse leniently.static final net.kyori.option.OptionSchema
A schema of options available on the Gson loader.Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, HEADER_MODE, headerMode, sink, source
-
Method Summary
Modifier and TypeMethodDescription@NonNull GsonConfigurationLoader
build()
int
indent()
Gets the level of indentation to be used by the resultant loader.@NonNull GsonConfigurationLoader.Builder
indent
(int indent) Sets the level of indentation the resultant loader should use.boolean
lenient()
Gets if the resultant loader should parse leniently.@NonNull GsonConfigurationLoader.Builder
lenient
(boolean lenient) Sets if the resultant loader should parse leniently.protected net.kyori.option.OptionSchema
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
buildAndLoadString, buildAndSaveString, defaultOptions, defaultOptions, defaultOptions, editOptions, file, headerMode, headerMode, optionState, optionState, optionStateBuilder, path, sink, sink, source, source, url
-
Field Details
-
SCHEMA
A schema of options available on the Gson loader.- Since:
- 4.2.0
-
INDENT
The level of indentation to be used by the resulting loader.- Since:
- 4.2.0
-
LENIENT
If the resultant loader should parse leniently.- Since:
- 4.2.0
-
-
Method Details
-
optionSchema
-
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
Gets the level of indentation to be used by the resultant loader.- Returns:
- the indent level
- Since:
- 4.0.0
-
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
Gets if the resultant loader should parse leniently.- Returns:
- whether the parser should parse leniently
- Since:
- 4.0.0
-
build
- Specified by:
build
in classAbstractConfigurationLoader.Builder<GsonConfigurationLoader.Builder,
GsonConfigurationLoader>
-