Class OverrideSources

java.lang.Object
io.helidon.config.OverrideSources

public final class OverrideSources extends Object
Class provides access to built-in OverrideSource implementations.
See Also:
  • Method Details

    • empty

      public static OverrideSource empty()
      An empty implementation of OverrideSource.

      A single instance is hold, so the return value is always the same.

      Returns:
      an empty implementation of OverrideSource
    • create

      public static OverrideSource create(Map<String,String> overrideValues)
      Creates a new instance od OverrideSource from a map of wildcards to values.

      Note that Map does not guarantee the ordering of the items, but overrides are resolved in specified order. When more than one of the overrides keys might match, the first of them will be applied.

      Parameters:
      overrideValues - a map of wildcards to values
      Returns:
      a new instance of OverrideSource
    • classpath

      public static ClasspathOverrideSource.Builder classpath(String resourceName)
      Creates new instance of Classpath OverrideSource Builder to be used to bootstrap OverrideSource instance from specified resource.

      The name of a resource is a '/'-separated full path name that identifies the resource. If the resource name has a leading slash then it is dropped before lookup.

      Parameters:
      resourceName - a name of the resource
      Returns:
      new Builder instance
    • file

      public static FileOverrideSource.Builder file(String file)
      Creates new instance of the File OverrideSource Builder to be used to bootstrap an File OverrideSource instance.
      Parameters:
      file - a file with an override value map
      Returns:
      an instance of builder
    • url

      public static UrlOverrideSource.Builder url(URL url)
      Creates new instance of the URL OverrideSource Builder to be used to bootstrap an URL OverrideSource instance.
      Parameters:
      url - an URL with an override value map
      Returns:
      an instance of builder