AlternateGenericRegexFileMatcher implements AlternateFileMatcher { public boolean matches(@NotNull String filename) { return matchPattern.matcher(filename).matches(); } AlternateGenericRegexFileMatcher(String currentFilename, AlternateConfiguration configuration); boolean canProcess(); boolean matches(@NotNull String filename); @NotNull String getBaseFilename(@NotNull String filename);  }
@Test public void testMatches() throws Exception { AlternateConfiguration configuration = new AlternateConfiguration(); configuration.freeRegexActive = false; configuration.genericRegexActive = true; assertArrayEquals(new Object[]{ "MyClass|MyClass.java", "MyClass|MyClass.properties", "MyClass|MyClass_en.properties", "MyClass|MyClass_en_UK.properties", "MyClassTest|MyClassTest.java", "MyClassTest|MyClassTest.properties", "MyClassTest|MyClassTest_en.properties", "MyClassTest|MyClassTest_en_UK.properties", "AbstractMyClass|AbstractMyClass.java", "AbstractMyClass|AbstractMyClass.properties", "AbstractMyClass|AbstractMyClass_en.properties", "AbstractMyClass|AbstractMyClass_en_UK.properties", "AbstractMyClassTest|AbstractMyClassTest.java", "AbstractMyClassTest|AbstractMyClassTest.properties", "AbstractMyClassTest|AbstractMyClassTest_en.properties", "AbstractMyClassTest|AbstractMyClassTest_en_UK.properties", }, getMatchList(new AlternateGenericRegexFileMatcher("MyClass.java", configuration))); }