Class JarResourcesConfigPathResolver

java.lang.Object
me.bristermitten.mittenlib.config.paths.JarResourcesConfigPathResolver
All Implemented Interfaces:
ConfigPathResolver

public class JarResourcesConfigPathResolver extends Object implements ConfigPathResolver
A ConfigPathResolver that resolves config paths from the jar resources.
  • Constructor Details

    • JarResourcesConfigPathResolver

      public JarResourcesConfigPathResolver()
  • Method Details

    • getConfigPath

      public Result<Path> getConfigPath(String configFileName)
      Description copied from interface: ConfigPathResolver
      Resolve a file name to a Path
      Specified by:
      getConfigPath in interface ConfigPathResolver
      Parameters:
      configFileName - the file name to resolve
      Returns:
      the resolved path, or an error if the file name could not be resolved. Note that this may return a successful result with a path that does not exist. The failure case is specifically for error states.