- java.lang.Object
-
- org.asciidoctor.asciidoclet.AntPathMatcher
-
public class AntPathMatcher extends Object
Path matcher implementation for Ant-style path patterns. This implementation matches URLs using the following rules:
-
?
matches one character -
*
matches zero or more characters -
**
matches zero or more directories in a path
The instances of this class can be configured via its
AntPathMatcher.Builder
to:-
Use a custom path separator. The default is
/
character -
Ignore character case during comparison. The default is
false
-
Match start. Determines whether the pattern at least matches as far as the given base path goes, assuming that a full path may then match as well. The default is
false
. -
Specify whether to trim tokenized paths. The default is
false
The custom path separator & ignoring character case options were inspired by Spring’s
AntPathMatcher
Class copied from https://github.com/azagniotov/ant-style-path-matcher
-
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AntPathMatcher.Builder
A builder class forAndPathMatcher
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMatch(String pattern, String path)
Checks if apath
matches with a givenpattern
.
-