class DefaultRequestPath extends java.lang.Object implements RequestPath
RequestPath
.PathContainer.Element, PathContainer.PathSegment, PathContainer.Separator
Modifier and Type | Field and Description |
---|---|
private PathContainer |
contextPath |
private PathContainer |
fullPath |
private PathContainer |
pathWithinApplication |
Modifier | Constructor and Description |
---|---|
private |
DefaultRequestPath(RequestPath requestPath,
java.lang.String contextPath) |
(package private) |
DefaultRequestPath(java.net.URI uri,
java.lang.String contextPath) |
Modifier and Type | Method and Description |
---|---|
PathContainer |
contextPath()
Returns the portion of the URL path that represents the application.
|
java.util.List<PathContainer.Element> |
elements()
The list of path elements, either
PathContainer.Separator or PathContainer.PathSegment . |
boolean |
equals(java.lang.Object other) |
private static PathContainer |
extractPathWithinApplication(PathContainer fullPath,
PathContainer contextPath) |
int |
hashCode() |
private static PathContainer |
initContextPath(PathContainer path,
java.lang.String contextPath) |
RequestPath |
modifyContextPath(java.lang.String contextPath)
Return a new
RequestPath instance with a modified context path. |
PathContainer |
pathWithinApplication()
The portion of the request path after the context path.
|
java.lang.String |
toString() |
private static void |
validateContextPath(java.lang.String fullPath,
java.lang.String contextPath) |
java.lang.String |
value()
The original (raw, encoded) path that this instance was parsed from.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
parse
parsePath, subPath, subPath
private final PathContainer fullPath
private final PathContainer contextPath
private final PathContainer pathWithinApplication
DefaultRequestPath(java.net.URI uri, @Nullable java.lang.String contextPath)
private DefaultRequestPath(RequestPath requestPath, java.lang.String contextPath)
private static PathContainer initContextPath(PathContainer path, @Nullable java.lang.String contextPath)
private static void validateContextPath(java.lang.String fullPath, java.lang.String contextPath)
private static PathContainer extractPathWithinApplication(PathContainer fullPath, PathContainer contextPath)
public java.lang.String value()
PathContainer
value
in interface PathContainer
public java.util.List<PathContainer.Element> elements()
PathContainer
PathContainer.Separator
or PathContainer.PathSegment
.elements
in interface PathContainer
public PathContainer contextPath()
RequestPath
The context path may come from the underlying runtime API such as
when deploying as a WAR to a Servlet container or it may be assigned in
a WebFlux application through the use of
ContextPathCompositeHandler
.
contextPath
in interface RequestPath
public PathContainer pathWithinApplication()
RequestPath
pathWithinApplication
in interface RequestPath
public RequestPath modifyContextPath(java.lang.String contextPath)
RequestPath
RequestPath
instance with a modified context path.
The new context path must match 0 or more path segments at the start.modifyContextPath
in interface RequestPath
contextPath
- the new context pathRequestPath
instancepublic boolean equals(@Nullable java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object