@Test public void dotNameFilter() { Predicate<DotName> predicate = new PathFilter.Builder() .include("foo/bar/*") .exclude("foo/baz/*") .build().asDotNamePredicate(); assertTrue(predicate.test(DotName.createSimple("foo.bar.Class"))); assertFalse(predicate.test(DotName.createSimple("foo.baz.Class"))); }
public Predicate<DotName> asDotNamePredicate() { if (ObjectHelper.isEmpty(excludePatterns) && ObjectHelper.isEmpty(includePatterns)) { return dotName -> true; } else { return dotName -> stringPredicate.test(dotName.toString().replace('.', '/')); } }
PathFilter { public Predicate<DotName> asDotNamePredicate() { if (ObjectHelper.isEmpty(excludePatterns) && ObjectHelper.isEmpty(includePatterns)) { return dotName -> true; } else { return dotName -> stringPredicate.test(dotName.toString().replace('.', '/')); } } }
PathFilter { public Predicate<DotName> asDotNamePredicate() { if (ObjectHelper.isEmpty(excludePatterns) && ObjectHelper.isEmpty(includePatterns)) { return dotName -> true; } else { return dotName -> stringPredicate.test(dotName.toString().replace('.', '/')); } } PathFilter(List<String> includePatterns, List<String> excludePatterns); }
PathFilter { public Predicate<DotName> asDotNamePredicate() { if (ObjectHelper.isEmpty(excludePatterns) && ObjectHelper.isEmpty(includePatterns)) { return dotName -> true; } else { return dotName -> stringPredicate.test(dotName.toString().replace('.', '/')); } } PathFilter(List<String> includePatterns, List<String> excludePatterns); Predicate<String> asStringPredicate(); Predicate<DotName> asDotNamePredicate(); Predicate<Path> asPathPredicate(); String[] scanClassNames(Path rootPath, Stream<Path> pathStream, Predicate<Path> isRegularFile); }
PathFilter { public Predicate<DotName> asDotNamePredicate() { if (ObjectHelper.isEmpty(excludePatterns) && ObjectHelper.isEmpty(includePatterns)) { return dotName -> true; } else { return dotName -> stringPredicate.test(dotName.toString().replace('.', '/')); } } PathFilter(List<String> includePatterns, List<String> excludePatterns); Predicate<String> asStringPredicate(); Predicate<DotName> asDotNamePredicate(); Predicate<Path> asPathPredicate(); String[] scanClassNames(Path rootPath, Stream<Path> pathStream, Predicate<Path> isRegularFile);  }