Package io.micronaut.core.util
Interface PathMatcher
-
- All Known Implementing Classes:
AntPathMatcher,RegexPathMatcher
public interface PathMatcherInterface for components that can match source strings against a specified pattern string.Different implementations can support different pattern types, for example, Ant style path expressions, or regular expressions, or other types of text based patterns.
- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static AntPathMatcherANTThe default Ant style path matcher.static RegexPathMatcherREGEXThe default regex style path matcher.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanmatches(java.lang.String pattern, java.lang.String source)Returnstrueif the givensourcematches the specifiedpattern,falseotherwise.
-
-
-
Field Detail
-
ANT
static final AntPathMatcher ANT
The default Ant style path matcher.
-
REGEX
static final RegexPathMatcher REGEX
The default regex style path matcher.
-
-
Method Detail
-
matches
boolean matches(java.lang.String pattern, java.lang.String source)Returnstrueif the givensourcematches the specifiedpattern,falseotherwise.- Parameters:
pattern- the pattern to match againstsource- the source to match- Returns:
trueif the givensourcematches the specifiedpattern,falseotherwise.
-
-