Class PathMatchers

java.lang.Object
org.eclipse.jetty.start.PathMatchers

public class PathMatchers extends Object
Common PathMatcher implementations.
  • Field Details

    • GLOB_CHARS

      private static final char[] GLOB_CHARS
    • SYNTAXED_GLOB_CHARS

      private static final char[] SYNTAXED_GLOB_CHARS
    • EMPTY_PATH

      private static final Path EMPTY_PATH
  • Constructor Details

    • PathMatchers

      public PathMatchers()
  • Method Details

    • asPath

      private static Path asPath(String pattern)
      Convert a pattern to a Path object.
      Parameters:
      pattern - the raw pattern (can contain "glob:" or "regex:" syntax indicator)
      Returns:
      the Path version of the pattern provided.
    • getMatcher

      public static PathMatcher getMatcher(String rawpattern)
    • getNonHidden

      public static PathMatcher getNonHidden()
    • getSearchRoot

      public static Path getSearchRoot(String pattern)
      Provide the non-glob / non-regex prefix on the pattern as a Path reference.
      Parameters:
      pattern - the pattern to test
      Returns:
      the Path representing the search root for the pattern provided.
    • countChars

      private static int countChars(String pattern, int offset, char c)
    • isAbsolute

      public static boolean isAbsolute(String pattern)
      Tests if provided pattern is an absolute reference (or not)
      Parameters:
      pattern - the pattern to test
      Returns:
      true if pattern is an absolute reference.
    • isGlob

      private static boolean isGlob(char c, boolean syntaxed)
      Determine if part is a glob pattern.
      Parameters:
      c - the char to check
      syntaxed - true if overall pattern is syntaxed with "glob:" or "regex:"
      Returns:
      true if part has glob characters