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. Combines two patterns into a single pattern. |
| public PathMatcher | |
| public Comparator | getPatternComparator(RouteMatcher.
the full path to use for comparison routeImplements org. Given a route, return a |
| public boolean | isPattern(String
the route to check route)Implements org. Whether the given |
| public boolean | match(String
the pattern to try to match pattern, RouteMatcher.the route to test against routeImplements org. Match the given route against the given pattern. |
| public Map | matchAndExtract(String
the pattern, possibly containing templates variables pattern, RouteMatcher.the route to extract template variables from routeImplements org. Match the pattern to the route and extract template variables. |
| public RouteMatcher. | parseRoute(String
the route to parse route)Implements org. Return a parsed representation of the given route. |
| 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.
Satisfying this method's contract implies a non- | |
| value | back to summary |
|---|---|
| public String value() Implements org. Doc from org. The original route value.
| |