Class HoconConfigParserBuilder

java.lang.Object
io.helidon.config.hocon.HoconConfigParserBuilder
All Implemented Interfaces:
Builder<HoconConfigParserBuilder,ConfigParser>, Supplier<ConfigParser>

public final class HoconConfigParserBuilder extends Object implements Builder<HoconConfigParserBuilder,ConfigParser>
HOCON ConfigParser Builder.

HOCON resolving substitutions support is by default enabled. ConfigResolveOptions.defaults() is used to resolve loaded configuration. It is possible to disable resolving feature or specify custom ConfigResolveOptions instance.

  • Method Details

    • disableResolving

      @Deprecated(since="2.5.1", forRemoval=true) public HoconConfigParserBuilder disableResolving()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Disables HOCON resolving substitutions support. Default is false.
      Returns:
      modified builder instance
      See Also:
      • resolvingEnabled
    • resolvingEnabled

      public HoconConfigParserBuilder resolvingEnabled(boolean enabled)
      Enables/disables HOCON resolving substitutions support. Default is false.

      Note: Even if you disable substitution at HOCON parsing time, values can still be resolved at a later time by the Helidon Config system.

      Parameters:
      enabled - use to enable or disable substitution
      Returns:
      modified builder instance
    • resolveOptions

      public HoconConfigParserBuilder resolveOptions(ConfigResolveOptions resolveOptions)
      Sets custom instance of ConfigResolveOptions.

      By default ConfigResolveOptions.defaults() is used.

      Parameters:
      resolveOptions - resolve options
      Returns:
      modified builder instance
    • build

      public HoconConfigParser build()
      Builds new instance of HOCON ConfigParser.
      Specified by:
      build in interface Builder<HoconConfigParserBuilder,ConfigParser>
      Returns:
      new instance of HOCON ConfigParser.