Class OverrideSources

    • Method Detail

      • 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 AbstractOverrideSource.Builder<? extends AbstractOverrideSource.Builder<?,​Path>,​Path> 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