Class GlobMatcher

java.lang.Object
org.jdrupes.gitversioning.core.GlobMatcher
All Implemented Interfaces:
IncludeMatcher

public class GlobMatcher extends Object implements IncludeMatcher
Matches paths against a glob expression.

Delegates to PathMatcher with the glob: scheme.

  • Constructor Details

    • GlobMatcher

      public GlobMatcher(String pattern)
      Creates a new glob matcher.
      Parameters:
      pattern - the glob pattern
  • Method Details

    • matches

      public boolean matches(Path path)
      Description copied from interface: IncludeMatcher
      Checks whether the path matches the pattern.
      Specified by:
      matches in interface IncludeMatcher
      Parameters:
      path - the file path (relative to the work tree)
      Returns:
      true if the path matches