Class JsonConfigOptions

java.lang.Object
dev.orne.config.impl.JsonConfigOptions
Direct Known Subclasses:
YamlConfigOptions

@API(status=INTERNAL, since="1.0") public class JsonConfigOptions extends Object
Options of Jackson ObjectNode based configuration builder.
Since:
1.0
Version:
1.0, 2025-07
Author:
(w) Iker Hernaez
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor.
    Copy constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(com.fasterxml.jackson.databind.node.ObjectNode values)
    Adds the specified configuration properties to the configuration properties.
    com.fasterxml.jackson.databind.node.ObjectNode
    Returns the JSON object with the configuration properties.
    com.fasterxml.jackson.databind.ObjectMapper
    Returns the ObjectMapper instance used for JSON parsing.
    Returns the configuration nested properties separator.
    void
    load(File file)
    Loads the configuration properties from the specified file.
    void
    load(String path)
    Loads the configuration properties from the specified ClassLoader resource.
    void
    load(URL url)
    Loads the configuration properties from the specified URL.
    void
    load(Path path)
    Loads the configuration properties from the file in the specified path.
    void
    setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
    Sets the ObjectMapper instance used for JSON parsing.
    void
    Sets the configuration nested properties separator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonConfigOptions

      public JsonConfigOptions()
      Empty constructor.
    • JsonConfigOptions

      public JsonConfigOptions(JsonConfigOptions copy)
      Copy constructor.
      Parameters:
      copy - The instance to copy.
  • Method Details

    • getMapper

      public com.fasterxml.jackson.databind.ObjectMapper getMapper()
      Returns the ObjectMapper instance used for JSON parsing.
      Returns:
      The ObjectMapper instance used for JSON parsing.
    • setMapper

      public void setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Sets the ObjectMapper instance used for JSON parsing.
      Parameters:
      mapper - The ObjectMapper instance used for JSON parsing.
    • getJsonObject

      public com.fasterxml.jackson.databind.node.ObjectNode getJsonObject()
      Returns the JSON object with the configuration properties.
      Returns:
      The JSON object with the configuration properties.
    • getPropertySeparator

      public String getPropertySeparator()
      Returns the configuration nested properties separator.
      Returns:
      The configuration nested properties separator.
    • setPropertySeparator

      public void setPropertySeparator(String separator)
      Sets the configuration nested properties separator.
      Parameters:
      separator - The configuration nested properties separator.
    • add

      public void add(com.fasterxml.jackson.databind.node.ObjectNode values)
      Adds the specified configuration properties to the configuration properties.
      Parameters:
      values - The configuration properties.
    • load

      public void load(String path)
      Loads the configuration properties from the specified ClassLoader resource.
      Parameters:
      path - The ClassLoader resource path.
    • load

      public void load(Path path)
      Loads the configuration properties from the file in the specified path.
      Parameters:
      path - The file path.
    • load

      public void load(File file)
      Loads the configuration properties from the specified file.
      Parameters:
      file - The file to load.
    • load

      public void load(URL url)
      Loads the configuration properties from the specified URL.
      Parameters:
      url - The URL to load.