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 a 
HoconConfigurationLoader.
 This builder supports the following options:
- Since:
- 4.0.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final net.kyori.option.Option<Boolean>Set whether comments will be emitted.static final net.kyori.option.Option<Integer>Set the amount of spaces to indent with whenprettyPrinting(boolean)is on.static final net.kyori.option.Option<Boolean>Set whether JSON compatible output mode will be used.static final net.kyori.option.Option<Boolean>Set whether output from this loader will be pretty-printed or not.static final net.kyori.option.OptionSchemaA schema of options available to configure the Hocon loader.Fields inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.BuilderdefaultOptions, HEADER_MODE, headerMode, sink, source
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds the loader.emitComments(boolean emitComments) Set whether comments should be emitted.emitJsonCompatible(boolean jsonCompatible) Set whether output generated by this loader should be json-compatible.indent(int indent) Set the amount of spaces to indent with whenprettyPrinting(boolean)is on.protected net.kyori.option.OptionSchemaGet the schema of available options that can be set on this loader.prettyPrinting(boolean prettyPrinting) Set whether output from this loader will be pretty-printed or not.Methods inherited from class org.spongepowered.configurate.loader.AbstractConfigurationLoader.BuilderbuildAndLoadString, buildAndSaveString, defaultOptions, defaultOptions, defaultOptions, editOptions, file, headerMode, headerMode, optionState, optionState, optionStateBuilder, path, sink, sink, source, source, url
- 
Field Details- 
SCHEMAA schema of options available to configure the Hocon loader.- Since:
- 4.2.0
 
- 
PRETTY_PRINTINGSet whether output from this loader will be pretty-printed or not.- Since:
- 4.2.0
- See Also:
 
- 
INDENTSet the amount of spaces to indent with whenprettyPrinting(boolean)is on.- Since:
- 4.2.0
- See Also:
 
- 
COMMENTSSet whether comments will be emitted.- Since:
- 4.2.0
- See Also:
 
- 
JSON_COMPATIBLESet whether JSON compatible output mode will be used.- Since:
- 4.2.0
- See Also:
 
 
- 
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
optionSchemaDescription copied from class:AbstractConfigurationLoader.BuilderGet the schema of available options that can be set on this loader.This schema should inherit from AbstractConfigurationLoader.Builder.UNSAFE_SCHEMA.- Overrides:
- optionSchemain class- AbstractConfigurationLoader.Builder<HoconConfigurationLoader.Builder,- HoconConfigurationLoader> 
- Returns:
- the option schema
 
- 
prettyPrintingSet whether output from this loader will be pretty-printed or not.- Parameters:
- prettyPrinting- whether to pretty-print
- Returns:
- this builder
- Since:
- 4.0.0
 
- 
indentSet the amount of spaces to indent with whenprettyPrinting(boolean)is on.Defaults to 4. - Parameters:
- indent- indent level
- Returns:
- this builder
- Since:
- 4.2.0
 
- 
emitCommentsSet 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
 
- 
emitJsonCompatibleSet 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
 
- 
buildDescription copied from class:AbstractConfigurationLoader.BuilderBuilds the loader.- Specified by:
- buildin class- AbstractConfigurationLoader.Builder<HoconConfigurationLoader.Builder,- HoconConfigurationLoader> 
- Returns:
- a new loader
 
 
-