RouteMatcher that delegates to a PathMatcher.Note
This implementation is not efficient since
PathMatcher treats paths and patterns as Strings. For more optimized
performance use the PathPatternRouteMatcher from spring-web
which enables use of parsed routes and patterns.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final PathMatcher |
| Access | Constructor and Description |
|---|---|
| public | SimpleRouteMatcher(PathMatcher pathMatcher)
Create a new |
| Modifier and Type | Method and Description |
|---|---|
| public String | combine(String
the first pattern pattern1, String the second pattern pattern2)Implements org. |
| public PathMatcher | |
| public Comparator | getPatternComparator(RouteMatcher.
the full path to use for comparison routeImplements org. Comparator suitable for sorting patterns
in order of explicitness for that route, so that more specific patterns
come before more generic ones.
|
| public boolean | isPattern(String
the route to check route)Implements org. route contains pattern syntax which requires
the match(String, Route) method, or if it is a regular String
that could be compared directly to others.
|
| public boolean | match(String
the pattern to try to match pattern, RouteMatcher.the route to test against routeImplements org. |
| public Map | matchAndExtract(String
the pattern, possibly containing templates variables pattern, RouteMatcher.the route to extract template variables from routeImplements org. |
| public RouteMatcher. | parseRoute(String
the route to parse route)Implements org. |
| pathMatcher | back to summary |
|---|---|
| private final PathMatcher pathMatcher | |
| SimpleRouteMatcher | back to summary |
|---|---|
| public SimpleRouteMatcher(PathMatcher pathMatcher) Create a new | |
| combine | back to summary |
|---|---|
| public String combine(String pattern1, String pattern2) Implements org. Doc from org. Combines two patterns into a single pattern. | |
| getPathMatcher | back to summary |
|---|---|
| public PathMatcher getPathMatcher() Return the underlying | |
| getPatternComparator | back to summary |
|---|---|
| public Comparator Implements org. Doc from org. Given a route, return a
| |
| isPattern | back to summary |
|---|---|
| public boolean isPattern(String route) Implements org. Doc from org. Whether the given | |
| match | back to summary |
|---|---|
| public boolean match(String pattern, RouteMatcher. Implements org. Doc from org. Match the given route against the given pattern.
| |
| matchAndExtract | back to summary |
|---|---|
| public Map Implements org. Doc from org. Match the pattern to the route and extract template variables. | |
| parseRoute | back to summary |
|---|---|
| public RouteMatcher. Implements org. Doc from org. Return a parsed representation of the given route.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| path | back to summary |
|---|---|
| private final String path | |
| DefaultRoute | back to summary |
|---|---|
| pack-priv DefaultRoute(String path) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| value | back to summary |
|---|---|
| public String value() Implements org. Doc from org. The original route value.
| |