Class GlobSelector

java.lang.Object
org.apache.maven.plugins.clean.GlobSelector
All Implemented Interfaces:
Selector

class GlobSelector extends Object implements Selector
Selects paths based on Ant-like glob patterns.
  • Field Details

    • includes

      private final String[] includes
    • excludes

      private final String[] excludes
    • str

      private final String str
  • Constructor Details

    • GlobSelector

      GlobSelector(String[] includes, String[] excludes)
    • GlobSelector

      GlobSelector(String[] includes, String[] excludes, boolean useDefaultExcludes)
  • Method Details

    • toString

      private static String toString(String[] patterns)
    • addDefaultExcludes

      private static String[] addDefaultExcludes(String[] excludes, boolean useDefaultExcludes)
    • normalizePatterns

      private static String[] normalizePatterns(String[] patterns)
    • normalizePattern

      private static String normalizePattern(String pattern)
    • isSelected

      public boolean isSelected(String pathname)
      Description copied from interface: Selector
      Determines whether a path is selected for deletion.
      Specified by:
      isSelected in interface Selector
      Parameters:
      pathname - The pathname to test, must not be null.
      Returns:
      true if the given path is selected for deletion, false otherwise.
    • isMatched

      private static boolean isMatched(String pathname, String[] patterns)
    • couldHoldSelected

      public boolean couldHoldSelected(String pathname)
      Description copied from interface: Selector
      Determines whether a directory could contain selected paths.
      Specified by:
      couldHoldSelected in interface Selector
      Parameters:
      pathname - The directory pathname to test, must not be null.
      Returns:
      true if the given directory might contain selected paths, false if the directory will definitively not contain selected paths..
    • toString

      public String toString()
      Overrides:
      toString in class Object