Class PathPatternRouteMatcher
java.lang.Object
org.springframework.web.util.pattern.PathPatternRouteMatcher
- All Implemented Interfaces:
- RouteMatcher
RouteMatcher built on PathPatternParser that uses
 PathContainer and PathPattern as parsed representations of
 routes and patterns.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.util.RouteMatcherRouteMatcher.Route
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor withPathPatternParsercustomized forMESSAGE_ROUTEand without matching of trailing separator.Constructor with givenPathPatternParser.
- 
Method SummaryModifier and TypeMethodDescriptionCombines two patterns into a single pattern.Given a route, return aComparatorsuitable for sorting patterns in order of explicitness for that route, so that more specific patterns come before more generic ones.booleanWhether the givenroutecontains pattern syntax which requires theRouteMatcher.match(String, Route)method, or if it is a regular String that could be compared directly to others.booleanmatch(String pattern, RouteMatcher.Route route) Match the given route against the given pattern.matchAndExtract(String pattern, RouteMatcher.Route route) Match the pattern to the route and extract template variables.parseRoute(String routeValue) Return a parsed representation of the given route.
- 
Constructor Details- 
PathPatternRouteMatcherpublic PathPatternRouteMatcher()Default constructor withPathPatternParsercustomized forMESSAGE_ROUTEand without matching of trailing separator.
- 
PathPatternRouteMatcherConstructor with givenPathPatternParser.
 
- 
- 
Method Details- 
parseRouteDescription copied from interface:RouteMatcherReturn a parsed representation of the given route.- Specified by:
- parseRoutein interface- RouteMatcher
- Parameters:
- routeValue- the route to parse
- Returns:
- the parsed representation of the route
 
- 
isPatternDescription copied from interface:RouteMatcherWhether the givenroutecontains pattern syntax which requires theRouteMatcher.match(String, Route)method, or if it is a regular String that could be compared directly to others.- Specified by:
- isPatternin interface- RouteMatcher
- Parameters:
- route- the route to check
- Returns:
- trueif the given- routerepresents a pattern
 
- 
combineDescription copied from interface:RouteMatcherCombines two patterns into a single pattern.- Specified by:
- combinein interface- RouteMatcher
- Parameters:
- pattern1- the first pattern
- pattern2- the second pattern
- Returns:
- the combination of the two patterns
 
- 
matchDescription copied from interface:RouteMatcherMatch the given route against the given pattern.- Specified by:
- matchin interface- RouteMatcher
- Parameters:
- pattern- the pattern to try to match
- route- the route to test against
- Returns:
- trueif there is a match,- falseotherwise
 
- 
matchAndExtractDescription copied from interface:RouteMatcherMatch the pattern to the route and extract template variables.- Specified by:
- matchAndExtractin interface- RouteMatcher
- Parameters:
- pattern- the pattern, possibly containing templates variables
- route- the route to extract template variables from
- Returns:
- a map with template variables and values
 
- 
getPatternComparatorDescription copied from interface:RouteMatcherGiven a route, return aComparatorsuitable for sorting patterns in order of explicitness for that route, so that more specific patterns come before more generic ones.- Specified by:
- getPatternComparatorin interface- RouteMatcher
- Parameters:
- route- the full path to use for comparison
- Returns:
- a comparator capable of sorting patterns in order of explicitness
 
 
-