java.lang.Object
dev.orne.config.impl.JsonConfigOptions
- Direct Known Subclasses:
YamlConfigOptions
Options of Jackson
ObjectNode based configuration builder.- Since:
- 1.0
- Version:
- 1.0, 2025-07
- Author:
- (w) Iker Hernaez
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.JsonConfigOptions(@NotNull JsonConfigOptions copy) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(@NotNull com.fasterxml.jackson.databind.node.ObjectNode values) Adds the specified configuration properties to the configuration properties.@NotNull com.fasterxml.jackson.databind.node.ObjectNodeReturns the JSON object with the configuration properties.@NotNull com.fasterxml.jackson.databind.ObjectMapperReturns theObjectMapperinstance used for JSON parsing.@NotEmpty StringReturns the configuration nested properties separator.voidLoads the configuration properties from the specified file.voidLoads the configuration properties from the specified ClassLoader resource.voidLoads the configuration properties from the specified URL.voidLoads the configuration properties from the file in the specified path.voidsetMapper(@NotNull com.fasterxml.jackson.databind.ObjectMapper mapper) Sets theObjectMapperinstance used for JSON parsing.voidsetPropertySeparator(@NotEmpty String separator) Sets the configuration nested properties separator.
-
Constructor Details
-
JsonConfigOptions
public JsonConfigOptions()Empty constructor. -
JsonConfigOptions
Copy constructor.- Parameters:
copy- The instance to copy.
-
-
Method Details
-
getMapper
@NotNull public @NotNull com.fasterxml.jackson.databind.ObjectMapper getMapper()Returns theObjectMapperinstance used for JSON parsing.- Returns:
- The
ObjectMapperinstance used for JSON parsing.
-
setMapper
public void setMapper(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper mapper) Sets theObjectMapperinstance used for JSON parsing.- Parameters:
mapper- TheObjectMapperinstance used for JSON parsing.
-
getJsonObject
@NotNull public @NotNull com.fasterxml.jackson.databind.node.ObjectNode getJsonObject()Returns the JSON object with the configuration properties.- Returns:
- The JSON object with the configuration properties.
-
getPropertySeparator
Returns the configuration nested properties separator.- Returns:
- The configuration nested properties separator.
-
setPropertySeparator
Sets the configuration nested properties separator.- Parameters:
separator- The configuration nested properties separator.
-
add
public void add(@NotNull @NotNull com.fasterxml.jackson.databind.node.ObjectNode values) Adds the specified configuration properties to the configuration properties.- Parameters:
values- The configuration properties.
-
load
Loads the configuration properties from the specified ClassLoader resource.- Parameters:
path- The ClassLoader resource path.
-
load
Loads the configuration properties from the file in the specified path.- Parameters:
path- The file path.
-
load
Loads the configuration properties from the specified file.- Parameters:
file- The file to load.
-
load
Loads the configuration properties from the specified URL.- Parameters:
url- The URL to load.
-