Class AntPatternMatcher

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

public class AntPatternMatcher extends Object implements IncludeMatcher
Matches paths against an Ant-style pattern.

Supports *, **, and ? wildcards via the ant-style-path-matcher library.

  • Constructor Details

    • AntPatternMatcher

      public AntPatternMatcher(String pattern)
      Creates a new Ant pattern matcher.
      Parameters:
      pattern - the Ant-style 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