java.lang.Object
dev.orne.config.impl.AbstractConfigBuilderImpl<PreferencesConfigBuilder>
dev.orne.config.impl.PreferencesConfigBuilderImpl
- All Implemented Interfaces:
ConfigBuilder<PreferencesConfigBuilder>,MutableCapableConfigBuilder<PreferencesConfigBuilder>,PreferencesConfigBuilder,PreferencesConfigInitialBuilder
@API(status=INTERNAL,
since="1.0")
public class PreferencesConfigBuilderImpl
extends AbstractConfigBuilderImpl<PreferencesConfigBuilder>
implements PreferencesConfigInitialBuilder, PreferencesConfigBuilder
Implementation of
Preferences based immutable configuration builder.- Since:
- 1.0
- Version:
- 1.0, 2025-05
- Author:
- (w) Iker Hernaez
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull PreferencesConfigOptionsThe preferences based configuration options.Fields inherited from class dev.orne.config.impl.AbstractConfigBuilderImpl
options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PreferencesConfigImplbuild()Creates the configuration instance.@NotNull PreferencesMutableConfigBuildermutable()Makes the configuration instance mutable.@NotNull PreferencesConfigBuilderofNode(@NotNull Preferences preferences) Selects the specified preferences node.@NotNull PreferencesConfigBuilderSelects the node for the package of the specified class on the system preferences tree.@NotNull PreferencesConfigBuilderSelects the node with the specified path relative to the node for the package of the specified class on the system preferences tree.@NotNull PreferencesConfigBuilderSelects the node with the specified path on the system preferences tree.@NotNull PreferencesConfigBuilderSelects the system preferences tree root node.@NotNull PreferencesConfigBuilderSelects the node for the package of the specified class on the user preferences tree.@NotNull PreferencesConfigBuilderSelects the node with the specified path relative to the node for the package of the specified class on the user preferences tree.@NotNull PreferencesConfigBuilderSelects the node with the specified path on the user preferences tree.@NotNull PreferencesConfigBuilderSelects the user preferences tree root node.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
-
preferencesOptions
The preferences based configuration options.
-
-
Constructor Details
-
PreferencesConfigBuilderImpl
public PreferencesConfigBuilderImpl()Creates a new instance.
-
-
Method Details
-
ofUserRoot
Selects the user preferences tree root node.- Specified by:
ofUserRootin interfacePreferencesConfigInitialBuilder- Returns:
- Next builder, for method chaining.
- See Also:
-
ofUser
Selects the node with the specified path on the user preferences tree.- Specified by:
ofUserin interfacePreferencesConfigInitialBuilder- Parameters:
path- The path of the configuration's preferences, relative to user preference tree's root node- Returns:
- Next builder, for method chaining.
- See Also:
-
ofUser
Selects the node for the package of the specified class on the user preferences tree.- Specified by:
ofUserin interfacePreferencesConfigInitialBuilder- Parameters:
clazz- The class which package use when calculating base node- Returns:
- Next builder, for method chaining.
- See Also:
-
ofUser
@NotNull public @NotNull PreferencesConfigBuilder ofUser(@NotNull @NotNull Class<?> clazz, @NotNull @NotNull String path) Selects the node with the specified path relative to the node for the package of the specified class on the user preferences tree.- Specified by:
ofUserin interfacePreferencesConfigInitialBuilder- Parameters:
clazz- The class which package use when calculating base nodepath- The path of the configuration's preferences, relative to base node- Returns:
- Next builder, for method chaining.
- See Also:
-
ofSystemRoot
Selects the system preferences tree root node.- Specified by:
ofSystemRootin interfacePreferencesConfigInitialBuilder- Returns:
- Next builder, for method chaining.
- See Also:
-
ofSystem
Selects the node with the specified path on the system preferences tree.- Specified by:
ofSystemin interfacePreferencesConfigInitialBuilder- Parameters:
path- The path of the configuration's preferences, relative to root node.- Returns:
- Next builder, for method chaining.
- See Also:
-
ofSystem
Selects the node for the package of the specified class on the system preferences tree.- Specified by:
ofSystemin interfacePreferencesConfigInitialBuilder- Parameters:
clazz- The class which package use when calculating base node.- Returns:
- Next builder, for method chaining.
- See Also:
-
ofSystem
@NotNull public @NotNull PreferencesConfigBuilder ofSystem(@NotNull @NotNull Class<?> clazz, @NotNull @NotNull String path) Selects the node with the specified path relative to the node for the package of the specified class on the system preferences tree.- Specified by:
ofSystemin interfacePreferencesConfigInitialBuilder- Parameters:
clazz- The class which package use when calculating base nodepath- The path of the configuration's preferences, relative to base node- Returns:
- Next builder, for method chaining.
- See Also:
-
ofNode
Selects the specified preferences node.- Specified by:
ofNodein interfacePreferencesConfigInitialBuilder- Parameters:
preferences- ThePreferencesnode to use.- Returns:
- Next builder, for method chaining.
-
mutable
Makes the configuration instance mutable.- Specified by:
mutablein interfaceMutableCapableConfigBuilder<PreferencesConfigBuilder>- Specified by:
mutablein interfacePreferencesConfigBuilder- Returns:
- This instance, for method chaining.
-
build
Creates the configuration instance.- Specified by:
buildin interfaceConfigBuilder<PreferencesConfigBuilder>- Returns:
- The configuration instance.
-