Class PathFinder.PathFinderBuilder

java.lang.Object
xyz.ronella.trivial.handy.PathFinder.PathFinderBuilder
Enclosing class:
PathFinder

public static class PathFinder.PathFinderBuilder extends Object
The only class that can create an instance of PathFinder.
  • Method Details

    • build

      public PathFinder build()
      Build an instance of a PathFinder.
      Returns:
      An instance of PathFinder.
    • addPaths

      public PathFinder.PathFinderBuilder addPaths(List<String> dirs)
      Adds a list of directories where to find first existence of the filename.
      Parameters:
      dirs - A list of directories.
      Returns:
      An instance of PathFinderBuilder.
    • addPaths

      public PathFinder.PathFinderBuilder addPaths(String... dirs)
      Adds an array of directories where to find first existence of the filename.
      Parameters:
      dirs - A list of directories.
      Returns:
      An instance of PathFinderBuilder.
    • setFallbackToClassloader

      public PathFinder.PathFinderBuilder setFallbackToClassloader(boolean fallbackToCL)
      Set this to load the file using classloader if it doesn't exist in any of the paths provided. This is only useful when using the PathFinder.processInputStream() method.
      Parameters:
      fallbackToCL - indicates whether to use the classloader as fallback.
      Returns:
      An instance of PathFinderBuilder.