Class FileFinder.Builder

java.lang.Object
org.apache.juneau.marshall.cp.FileFinder.Builder
Enclosing interface:
FileFinder

public static class FileFinder.Builder extends Object
Builder class.
  • Constructor Details

    • Builder

      protected Builder(BeanStore beanStore)
      Constructor.
      Parameters:
      beanStore - The bean store to use for creating beans.
  • Method Details

    • beanStore

      public BeanStore beanStore()
      Returns the bean store used by this builder.
      Returns:
      The bean store used by this builder.
    • caching

      public FileFinder.Builder caching(long cachingLimit)
      Enables in-memory caching of files for quicker retrieval.
      Parameters:
      cachingLimit - The maximum file size in bytes.
      Returns:
      This object.
    • cp

      public FileFinder.Builder cp(Class<?> c, String path, boolean recursive)
      Adds a class subpackage to the lookup paths.
      Parameters:
      c - The class whose package will be added to the lookup paths. Must not be null.
      path - The absolute or relative subpath. Can be null (the class's own package root is used with no subpath appended).
      recursive - If true, also recursively adds all the paths of the parent classes as well.
      Returns:
      This object.
    • dir

      public FileFinder.Builder dir(String value)
      Adds a file system directory to the lookup paths.
      Parameters:
      value - The path relative to the working directory. Must not be null.
      Returns:
      This object.
    • exclude

      public FileFinder.Builder exclude(String... patterns)
      Specifies the regular expression file name pattern to use to exclude files from being retrieved from the file source.
      Parameters:
      patterns - The regular expression exclude patterns.
      If none are specified, no files will be excluded.
      Returns:
      This object.
    • include

      public FileFinder.Builder include(String... patterns)
      Specifies the regular expression file name patterns to use to include files being retrieved from the file source.
      Parameters:
      patterns - The regular expression include patterns.
      The default is ".*".
      Returns:
      This object.
    • path

      public FileFinder.Builder path(Path value)
      Adds a file system directory to the lookup paths.
      Parameters:
      value - The directory path.
      Returns:
      This object.
    • build

      public FileFinder build()
      Builds the file finder.
      Returns:
      A new BasicFileFinder.