java.lang.Object
dev.orne.config.impl.AbstractConfigBuilderImpl<YamlConfigBuilder>
dev.orne.config.impl.YamlConfigBuilderImpl
- All Implemented Interfaces:
ConfigBuilder<YamlConfigBuilder>,MutableCapableConfigBuilder<YamlConfigBuilder>,YamlConfigBaseBuilder<YamlConfigBuilder>,YamlConfigBuilder
@API(status=INTERNAL,
since="1.0")
public class YamlConfigBuilderImpl
extends AbstractConfigBuilderImpl<YamlConfigBuilder>
implements YamlConfigBuilder
Implementation of YAML files based configuration builder.
- Since:
- 1.0
- Version:
- 1.0, 2025-07
- Author:
- (w) Iker Hernaez
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull YamlConfigOptionsThe YAML based configuration options.Fields inherited from class dev.orne.config.impl.AbstractConfigBuilderImpl
optionsFields inherited from interface dev.orne.config.YamlConfigBaseBuilder
DEFAULT_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull YamlConfigBuilderAdds the specified custom properties to the configuration properties.@NotNull YamlConfigImplbuild()Creates the configuration instance.@NotNull YamlConfigBuilderLoads the configuration properties from the specified file.@NotNull YamlConfigBuilderLoads the configuration properties from the specified ClassLoader resource.@NotNull YamlConfigBuilderLoads the configuration properties from the specified URL.@NotNull YamlConfigBuilderLoads the configuration properties from the file in the specified path.@NotNull YamlMutableConfigBuildermutable()Makes the configuration instance mutable.@NotNull YamlConfigBuilderwithSeparator(@NotEmpty String separator) Sets the configuration nested properties separator.Methods inherited from class dev.orne.config.impl.AbstractConfigBuilderImpl
thisBuilder, withDecoder, withDecorator, withEncryption, withOverrideParentProperties, withParent, withVariableResolutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.orne.config.ConfigBuilder
as, withDecoder, withDecorator, withEncryption, withOverrideParentProperties, withParent, withParent, withVariableResolution
-
Field Details
-
yamlOptions
The YAML based configuration options.
-
-
Constructor Details
-
YamlConfigBuilderImpl
public YamlConfigBuilderImpl()Empty constructor.
-
-
Method Details
-
withSeparator
Sets the configuration nested properties separator.- Specified by:
withSeparatorin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
separator- The configuration nested properties separator.- Returns:
- This instance, for method chaining.
-
add
Adds the specified custom properties to the configuration properties.Note that property keys will be processed with the configured nested properties separator.
- Specified by:
addin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
values- The configuration properties.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified ClassLoader resource.- Specified by:
loadin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
path- The ClassLoader resource path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the file in the specified path.- Specified by:
loadin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
path- The file path.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified file.- Specified by:
loadin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
file- The file to load.- Returns:
- This instance, for method chaining.
-
load
Loads the configuration properties from the specified URL.- Specified by:
loadin interfaceYamlConfigBaseBuilder<YamlConfigBuilder>- Parameters:
url- The URL to load.- Returns:
- This instance, for method chaining.
-
mutable
Makes the configuration instance mutable.- Specified by:
mutablein interfaceMutableCapableConfigBuilder<YamlConfigBuilder>- Specified by:
mutablein interfaceYamlConfigBuilder- Returns:
- This instance, for method chaining.
-
build
Creates the configuration instance.- Specified by:
buildin interfaceConfigBuilder<YamlConfigBuilder>- Returns:
- The configuration instance.
-