This class is immutable and thread safe.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final List | |
| private final char | |
| private static final WildMatcher | |
| private static final WildMatcher |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static List | |
| private static IMatcher | |
| public static IMatcher | Returns: never nulla pattern pattern, Character if this parameter isn't null then this character will not
match at wildcards(* and ? are wildcards). pathSeparator, boolean a boolean. dirOnly)Create path matcher |
| private boolean | |
| private static boolean | |
| private boolean | |
| public boolean | matches(String
string which is not null, but might be empty path, boolean true to assume this path as directory (even if it doesn't end
with a slash) assumeDirectory, boolean true if the match is for the full path: prefix-only
matches are not allowedImplements org. Matches entire given string |
| public boolean | matches(String
string which is not null, but might be empty segment, int start index, inclusive startIncl, int end index, exclusive endExcl)Implements org. Matches only part of given string |
| private boolean | |
| private boolean | |
| private static String |
| beginning | back to summary |
|---|---|
| private final boolean beginning | |
| matchers | back to summary |
|---|---|
| private final List<IMatcher> matchers | |
| slash | back to summary |
|---|---|
| private final char slash | |
| WILD_NO_DIRECTORY | back to summary |
|---|---|
| private static final WildMatcher WILD_NO_DIRECTORY | |
| WILD_ONLY_DIRECTORY | back to summary |
|---|---|
| private static final WildMatcher WILD_ONLY_DIRECTORY | |
| PathMatcher | back to summary |
|---|---|
| private PathMatcher(String pattern, Character pathSeparator, boolean dirOnly) throws InvalidPatternException | |
| createMatchers | back to summary |
|---|---|
| private static List | |
| createNameMatcher0 | back to summary |
|---|---|
| private static IMatcher createNameMatcher0(String segment, Character pathSeparator, boolean dirOnly, boolean lastSegment) throws InvalidPatternException | |
| createPathMatcher | back to summary |
|---|---|
| public static IMatcher createPathMatcher(String pattern, Character pathSeparator, boolean dirOnly) throws InvalidPatternException Create path matcher
| |
| isSimplePathWithSegments | back to summary |
|---|---|
| private boolean isSimplePathWithSegments(String path) | |
| isWild | back to summary |
|---|---|
| private static boolean isWild(IMatcher matcher) | |
| iterate | back to summary |
|---|---|
| private boolean iterate(final String path, final int startIncl, final int endExcl, boolean assumeDirectory, boolean pathMatch) | |
| matches | back to summary |
|---|---|
| public boolean matches(String path, boolean assumeDirectory, boolean pathMatch) Implements org. Doc from org. Matches entire given string
| |
| matches | back to summary |
|---|---|
| public boolean matches(String segment, int startIncl, int endExcl) Implements org. Doc from org. Matches only part of given string | |
| matches | back to summary |
|---|---|
| private boolean matches(int matcherIdx, String path, int startIncl, int endExcl, boolean assumeDirectory, boolean pathMatch) | |
| simpleMatch | back to summary |
|---|---|
| private boolean simpleMatch(String path, boolean assumeDirectory, boolean pathMatch) | |
| trim | back to summary |
|---|---|
| private static String trim(String pattern) Trim trailing spaces, unless they are escaped with backslash, see https://www.kernel.org/pub/software/scm/git/docs/gitignore.html | |