Package org.eclipse.jetty.http.pathmap
Class ServletPathSpec
- java.lang.Object
-
- org.eclipse.jetty.http.pathmap.PathSpec
-
- org.eclipse.jetty.http.pathmap.ServletPathSpec
-
-
Constructor Summary
Constructors Constructor Description ServletPathSpec(java.lang.String servletPathSpec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPathInfo(java.lang.String path)
Return the portion of the path that is after the path spec.java.lang.String
getPathMatch(java.lang.String path)
Return the portion of the path that matches a path spec.java.lang.String
getRelativePath(java.lang.String base, java.lang.String path)
Get the relative path.boolean
matches(java.lang.String path)
Test to see if the provided path matches this path specstatic java.lang.String
normalize(java.lang.String pathSpec)
If a servlet or filter path mapping isn't a suffix mapping, ensure it starts with '/'-
Methods inherited from class org.eclipse.jetty.http.pathmap.PathSpec
compareTo, equals, getDeclaration, getGroup, getPathDepth, getPrefix, getSuffix, hashCode, toString
-
-
-
-
Method Detail
-
normalize
public static java.lang.String normalize(java.lang.String pathSpec)
If a servlet or filter path mapping isn't a suffix mapping, ensure it starts with '/'- Parameters:
pathSpec
- the servlet or filter mapping pattern- Returns:
- the pathSpec prefixed by '/' if appropriate
-
getPathInfo
public java.lang.String getPathInfo(java.lang.String path)
Description copied from class:PathSpec
Return the portion of the path that is after the path spec.- Specified by:
getPathInfo
in 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:PathSpec
Return the portion of the path that matches a path spec.- Specified by:
getPathMatch
in classPathSpec
- Parameters:
path
- the path to match against- Returns:
- the match, or null if no match at all
-
getRelativePath
public java.lang.String getRelativePath(java.lang.String base, java.lang.String path)
Description copied from class:PathSpec
Get the relative path.- Specified by:
getRelativePath
in classPathSpec
- Parameters:
base
- the base the path is relative topath
- the additional path- Returns:
- the base plus path with pathSpec portion removed
-
-