Package org.eclipse.jetty.http.pathmap
Class RegexPathSpec
- java.lang.Object
-
- org.eclipse.jetty.http.pathmap.PathSpec
-
- org.eclipse.jetty.http.pathmap.RegexPathSpec
-
- All Implemented Interfaces:
java.lang.Comparable<PathSpec>
- Direct Known Subclasses:
UriTemplatePathSpec
public class RegexPathSpec extends PathSpec
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRegexPathSpec()RegexPathSpec(java.lang.String regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.regex.MatchergetMatcher(java.lang.String path)java.lang.StringgetPathInfo(java.lang.String path)Return the portion of the path that is after the path spec.java.lang.StringgetPathMatch(java.lang.String path)Return the portion of the path that matches a path spec.java.util.regex.PatterngetPattern()java.lang.StringgetRelativePath(java.lang.String base, java.lang.String path)Get the relative path.booleanmatches(java.lang.String path)Test to see if the provided path matches this path spec-
Methods inherited from class org.eclipse.jetty.http.pathmap.PathSpec
compareTo, equals, getDeclaration, getGroup, getPathDepth, getPrefix, getSuffix, hashCode, toString
-
-
-
-
Method Detail
-
getMatcher
public java.util.regex.Matcher getMatcher(java.lang.String path)
-
getPathInfo
public java.lang.String getPathInfo(java.lang.String path)
Description copied from class:PathSpecReturn the portion of the path that is after the path spec.- Specified by:
getPathInfoin classPathSpec- Parameters:
path- the path to match against- Returns:
- the path info portion of the string
-
getPathMatch
public java.lang.String getPathMatch(java.lang.String path)
Description copied from class:PathSpecReturn the portion of the path that matches a path spec.- Specified by:
getPathMatchin classPathSpec- Parameters:
path- the path to match against- Returns:
- the match, or null if no match at all
-
getPattern
public java.util.regex.Pattern getPattern()
-
getRelativePath
public java.lang.String getRelativePath(java.lang.String base, java.lang.String path)Description copied from class:PathSpecGet the relative path.- Specified by:
getRelativePathin classPathSpec- Parameters:
base- the base the path is relative topath- the additional path- Returns:
- the base plus path with pathSpec portion removed
-
-