Package io.github.connellite.match
Class AntPathMatcher
java.lang.Object
io.github.connellite.match.AntPathMatcher
Ant-style path matcher adapted from Spring Framework
AntPathMatcher.
Matching rules:
?matches one character within a path segment*matches zero or more characters within a path segment**matches zero or more path segments
Source: org.springframework.util.AntPathMatcher
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a matcher withDEFAULT_PATH_SEPARATORand case-sensitive matching.AntPathMatcher(String pathSeparator, boolean caseSensitive) Creates a matcher with the given separator and case-sensitivity. -
Method Summary
-
Field Details
-
DEFAULT_PATH_SEPARATOR
Default path separator ("/").- See Also:
-
-
Constructor Details
-
AntPathMatcher
public AntPathMatcher()Creates a matcher withDEFAULT_PATH_SEPARATORand case-sensitive matching. -
AntPathMatcher
Creates a matcher with the given separator and case-sensitivity.- Parameters:
pathSeparator- separator between path segments; must not benullcaseSensitive- whether segment matching is case-sensitive
-
-
Method Details
-
match
Returns whetherpathmatchespattern.- Parameters:
pattern- ant-style path patternpath- path to test- Returns:
truewhen the whole path matches the pattern
-