Class HoconConfigurationLoader.Builder
- java.lang.Object
-
- org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder<HoconConfigurationLoader.Builder,HoconConfigurationLoader>
-
- org.spongepowered.configurate.hocon.HoconConfigurationLoader.Builder
-
- Enclosing class:
- HoconConfigurationLoader
public static final class HoconConfigurationLoader.Builder extends AbstractConfigurationLoader.Builder<HoconConfigurationLoader.Builder,HoconConfigurationLoader>
Builds aHoconConfigurationLoader
.- 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 HoconConfigurationLoader
build()
Builds the loader.HoconConfigurationLoader.Builder
emitComments(boolean emitComments)
Set whether comments should be emitted.HoconConfigurationLoader.Builder
emitJsonCompatible(boolean jsonCompatible)
Set whether output generated by this loader should be json-compatible.HoconConfigurationLoader.Builder
prettyPrinting(boolean prettyPrinting)
Set whether output from this loader will be pretty-printed or not.-
Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder
defaultOptions, defaultOptions, defaultOptions, file, headerMode, headerMode, path, sink, sink, source, source, url
-
-
-
-
Method Detail
-
prettyPrinting
public HoconConfigurationLoader.Builder prettyPrinting(boolean prettyPrinting)
Set whether output from this loader will be pretty-printed or not.Output will always print with a fixed indent of 4 spaces per level. This is a limitation of the underlying library, so it may become customizable at some point in the future.
- Parameters:
prettyPrinting
- whether to pretty-print- Returns:
- this builder
- Since:
- 4.0.0
-
emitComments
public HoconConfigurationLoader.Builder emitComments(boolean emitComments)
Set whether comments should be emitted.Comments will always be loaded from files and stored in memory.
- Parameters:
emitComments
- whether to emit comments- Returns:
- this builder
- Since:
- 4.0.0
-
emitJsonCompatible
public HoconConfigurationLoader.Builder emitJsonCompatible(boolean jsonCompatible)
Set whether output generated by this loader should be json-compatible.Whatever format input is received in, this will output JSON. To be fully spec-compliant, comment output must also be disabled.
- Parameters:
jsonCompatible
- to emit json-format output- Returns:
- this builder
- Since:
- 4.0.0
-
build
public HoconConfigurationLoader build()
Description copied from class:AbstractConfigurationLoader.Builder
Builds the loader.- Specified by:
build
in classAbstractConfigurationLoader.Builder<HoconConfigurationLoader.Builder,HoconConfigurationLoader>
- Returns:
- a new loader
-
-