test_class.declarator: tmpFolder= new TemporaryFolder()
test_class.modifier: @Rule
    public
test_class.original_string: @Rule
    public TemporaryFolder tmpFolder= new TemporaryFolder();
test_class.type: TemporaryFolder
test_class.var_name: tmpFolder
test_class.file: kilt-core/src/test/java/de/poiu/kilt/util/FileMatcherTest.java
test_class.identifier: FileMatcherTest
test_case.body: @Test
    public void testMatches_multiCharGlob() {
      // - preparation
  
      final Path root= Paths.get("/my/root/");
      final String[] includes= {
        "f*o.properties"
      };
      final String[] excludes= {
      };
      final FileMatcher fileMatcher= new FileMatcher(root, includes, excludes);
  
      // - execution && verification
  
      assertThat(fileMatcher.matches(Paths.get("/my/root/foo.properties"))).isTrue();
      assertThat(fileMatcher.matches(Paths.get("/my/root/froo.properties"))).isTrue();
      assertThat(fileMatcher.matches(Paths.get("/my/root/fro.properties"))).isTrue();
      assertThat(fileMatcher.matches(Paths.get("/my/root/aro.properties"))).isFalse();
    }
test_case.class_method_signature: FileMatcherTest.testMatches_multiCharGlob()
test_case.full_signature: @Test public void testMatches_multiCharGlob()
test_case.identifier: testMatches_multiCharGlob
test_case.invocations: get isTrue assertThat matches get isTrue assertThat matches get isTrue assertThat matches get isFalse assertThat matches get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMatches_multiCharGlob()
focal_class.declarator: LOGGER= LogManager.getLogger()
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER= LogManager.getLogger();
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: root
focal_class.modifier: private final
focal_class.original_string: private final Path         root;
focal_class.type: Path
focal_class.var_name: root
focal_class.declarator: i18nIncludes
focal_class.modifier: private final
focal_class.original_string: private final List<String> i18nIncludes;
focal_class.type: List<String>
focal_class.var_name: i18nIncludes
focal_class.declarator: i18nIncludePatterns
focal_class.modifier: private final
focal_class.original_string: private final List<MatchPattern> i18nIncludePatterns;
focal_class.type: List<MatchPattern>
focal_class.var_name: i18nIncludePatterns
focal_class.declarator: i18nExcludes
focal_class.modifier: private final
focal_class.original_string: private final List<String> i18nExcludes;
focal_class.type: List<String>
focal_class.var_name: i18nExcludes
focal_class.declarator: i18nExcludePatterns
focal_class.modifier: private final
focal_class.original_string: private final List<MatchPattern> i18nExcludePatterns;
focal_class.type: List<MatchPattern>
focal_class.var_name: i18nExcludePatterns
focal_class.file: kilt-core/src/main/java/de/poiu/kilt/util/FileMatcher.java
focal_class.identifier: FileMatcher
focal_class.class_method_signature: FileMatcher.FileMatcher(final Path root, final String[] i18nIncludes)
focal_class.full_signature: public  FileMatcher(final Path root, final String[] i18nIncludes)
focal_class.identifier: FileMatcher
focal_class.modifiers: public
focal_class.parameters: (final Path root, final String[] i18nIncludes)
focal_class.signature:  FileMatcher(final Path root, final String[] i18nIncludes)
focal_class.class_method_signature: FileMatcher.FileMatcher(final Path root, final List<String> i18nIncludes)
focal_class.full_signature: public  FileMatcher(final Path root, final List<String> i18nIncludes)
focal_class.identifier: FileMatcher
focal_class.modifiers: public
focal_class.parameters: (final Path root, final List<String> i18nIncludes)
focal_class.signature:  FileMatcher(final Path root, final List<String> i18nIncludes)
focal_class.class_method_signature: FileMatcher.FileMatcher(final Path root, final String[] i18nIncludes, final String[] i18nExcludes)
focal_class.full_signature: public  FileMatcher(final Path root, final String[] i18nIncludes, final String[] i18nExcludes)
focal_class.identifier: FileMatcher
focal_class.modifiers: public
focal_class.parameters: (final Path root, final String[] i18nIncludes, final String[] i18nExcludes)
focal_class.signature:  FileMatcher(final Path root, final String[] i18nIncludes, final String[] i18nExcludes)
focal_class.class_method_signature: FileMatcher.FileMatcher(final Path root, final List<String> i18nIncludes, final List<String> i18nExcludes)
focal_class.full_signature: public  FileMatcher(final Path root, final List<String> i18nIncludes, final List<String> i18nExcludes)
focal_class.identifier: FileMatcher
focal_class.modifiers: public
focal_class.parameters: (final Path root, final List<String> i18nIncludes, final List<String> i18nExcludes)
focal_class.signature:  FileMatcher(final Path root, final List<String> i18nIncludes, final List<String> i18nExcludes)
focal_class.class_method_signature: FileMatcher.toMatchPatterns(final List<String> filePatterns)
focal_class.full_signature: private List<MatchPattern> toMatchPatterns(final List<String> filePatterns)
focal_class.identifier: toMatchPatterns
focal_class.modifiers: private
focal_class.parameters: (final List<String> filePatterns)
focal_class.return: List<MatchPattern>
focal_class.signature: List<MatchPattern> toMatchPatterns(final List<String> filePatterns)
focal_class.class_method_signature: FileMatcher.matches(final Path path)
focal_class.full_signature: public boolean matches(final Path path)
focal_class.identifier: matches
focal_class.modifiers: public
focal_class.parameters: (final Path path)
focal_class.return: boolean
focal_class.signature: boolean matches(final Path path)
focal_class.class_method_signature: FileMatcher.findMatchingFiles()
focal_class.full_signature: public Set<File> findMatchingFiles()
focal_class.identifier: findMatchingFiles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<File>
focal_class.signature: Set<File> findMatchingFiles()
focal_class.class_method_signature: FileMatcher.getRoot()
focal_class.full_signature: public Path getRoot()
focal_class.identifier: getRoot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getRoot()
focal_class.class_method_signature: FileMatcher.getI18nIncludes()
focal_class.full_signature: public List<String> getI18nIncludes()
focal_class.identifier: getI18nIncludes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getI18nIncludes()
focal_class.class_method_signature: FileMatcher.getI18nExcludes()
focal_class.full_signature: public List<String> getI18nExcludes()
focal_class.identifier: getI18nExcludes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getI18nExcludes()
focal_method.body: public boolean matches(final Path path) {
      final Path canonicalPath= this.root.resolve(path).toAbsolutePath().normalize();
  
      // if the path matches an exclude pattern, we can return false
      for (final MatchPattern matchPattern : this.i18nExcludePatterns) {
        // FIXME: How to decide whether to be case sensitive or not? Can we ask the filesystem?
        //        No builtin way in Java. We would need to write a file to check: https://stackoverflow.com/a/58349517/572645
        if (matchPattern.matchPath(canonicalPath.toString(), true)) {
          return false;
        }
      }
  
      // if the path matches an include pattern, we can return true
      for (final MatchPattern matchPattern : this.i18nIncludePatterns) {
        if (matchPattern.matchPath(canonicalPath.toString(), true)) {
          return true;
        }
      }
  
      // if there was no match, it obviously didn't match
      return false;
    }
focal_method.class_method_signature: FileMatcher.matches(final Path path)
focal_method.full_signature: public boolean matches(final Path path)
focal_method.identifier: matches
focal_method.invocations: normalize toAbsolutePath resolve matchPath toString matchPath toString
focal_method.modifiers: public
focal_method.parameters: (final Path path)
focal_method.return: boolean
focal_method.signature: boolean matches(final Path path)