private static class UriPatternType.RegexUriPatternMatcher extends java.lang.Object implements UriPatternMatcher
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
originalPattern |
private java.util.regex.Pattern |
pattern |
Constructor and Description |
---|
RegexUriPatternMatcher(java.lang.String pattern) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
extractPath(java.lang.String path) |
java.lang.String |
getOriginalPattern()
Returns the original pattern that was registered.
|
UriPatternType |
getPatternType()
Returns the type of pattern this is.
|
boolean |
matches(java.lang.String uri) |
private final java.util.regex.Pattern pattern
private final java.lang.String originalPattern
public boolean matches(java.lang.String uri)
matches
in interface UriPatternMatcher
uri
- A "contextual" (i.e. relative) and "normalized" Request URI, *not* a complete one.public java.lang.String extractPath(java.lang.String path)
extractPath
in interface UriPatternMatcher
path
- The Path that this service pattern can match against./home/*
then the path extracted will be /home
. Each pattern matcher
implementation must decide and publish what a canonical path represents.
NOTE(dhanji): This method returns null for the regex pattern matcher.public UriPatternType getPatternType()
UriPatternMatcher
getPatternType
in interface UriPatternMatcher
public java.lang.String getOriginalPattern()
UriPatternMatcher
getOriginalPattern
in interface UriPatternMatcher