public final class FilterUtils extends Object
This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.
This is a Singleton.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isIncluded(String source,
String[] excludes,
String[] includes,
boolean defaultValue) |
static boolean |
matchPath(String pattern,
String str,
boolean isCaseSensitive)
Tests whether or not a given path matches a given pattern.
|
static String[] |
tokenizePattern(String pattern) |
public static boolean isIncluded(String source, String[] excludes, String[] includes, boolean defaultValue)
public static boolean matchPath(String pattern, String str, boolean isCaseSensitive)
pattern - The pattern to match against. Must not be
null.str - The path to match, as a String. Must not be
null.isCaseSensitive - Whether or not matching should be performed
case sensitively.true if the pattern matches against the string,
or false otherwise.Copyright © 2024 OpenClover.org. All rights reserved.