Package com.google.inject.servlet
Class UriPatternType.ServletStyleUriPatternMatcher
java.lang.Object
com.google.inject.servlet.UriPatternType.ServletStyleUriPatternMatcher
- All Implemented Interfaces:
UriPatternMatcher
- Enclosing class:
- UriPatternType
private static class UriPatternType.ServletStyleUriPatternMatcher
extends Object
implements UriPatternMatcher
Matches URIs using the pattern grammar of the Servlet API and web.xml.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final String
private final UriPatternType.ServletStyleUriPatternMatcher.Kind
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractPath
(String path) Returns the original pattern that was registered.Returns the type of pattern this is.boolean
-
Field Details
-
literal
-
originalPattern
-
patternKind
-
-
Constructor Details
-
ServletStyleUriPatternMatcher
-
-
Method Details
-
matches
- Specified by:
matches
in interfaceUriPatternMatcher
- Parameters:
uri
- A "contextual" (i.e. relative) and "normalized" Request URI, *not* a complete one.- Returns:
- Returns true if the uri matches the pattern.
-
extractPath
- Specified by:
extractPath
in interfaceUriPatternMatcher
- Parameters:
path
- The Path that this service pattern can match against.- Returns:
- Returns a canonical servlet path from this pattern. For instance, if the pattern is
/home/*
then the path extracted will be/home
. Each pattern matcher implementation must decide and publish what a canonical path represents.NOTE(user): This method returns null for the regex pattern matcher.
-
getPatternType
Description copied from interface:UriPatternMatcher
Returns the type of pattern this is.- Specified by:
getPatternType
in interfaceUriPatternMatcher
-
getOriginalPattern
Description copied from interface:UriPatternMatcher
Returns the original pattern that was registered.- Specified by:
getOriginalPattern
in interfaceUriPatternMatcher
-