parsePath(String)
into a sequence of Separator and PathSegment elements.
Each PathSegment exposes its content in decoded form and with path
parameters removed. This makes it safe to match one path segment at a time
without the risk of decoded reserved characters altering the structure of
the path.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | PathContainer.
A path element, either separator or path segment. |
| public static class | PathContainer.
Options to customize parsing based on the type of input path. |
| public static interface | PathContainer.
Path segment element. |
| public static interface | PathContainer.
Path separator element. |
| Modifier and Type | Method and Description |
|---|---|
| public List | |
| public static PathContainer | Returns: the parsed paththe encoded, raw path value to parse path)Parse the path value into a sequence of |
| public static PathContainer | Returns: the parsed paththe encoded, raw path value to parse path, PathContainer.to customize parsing optionsParse the path value into a sequence of |
| public default PathContainer | Returns: the sub-paththe start element index (inclusive) index)Extract a sub-path from the given offset into the elements list. |
| public default PathContainer | Returns: the sub-paththe start element index (inclusive) startIndex, int the end element index (exclusive) endIndex)Extract a sub-path from the given start offset into the element list (inclusive) and to the end offset (exclusive). |
| public String |
| elements | back to summary |
|---|---|
| public List The contained path elements, either | |
| parsePath | back to summary |
|---|---|
| public static PathContainer parsePath(String path) Parse the path value into a sequence of
| |
| parsePath | back to summary |
|---|---|
| public static PathContainer parsePath(String path, PathContainer. Parse the path value into a sequence of
| |
| subPath | back to summary |
|---|---|
| public default PathContainer subPath(int index) Extract a sub-path from the given offset into the elements list.
| |
| subPath | back to summary |
|---|---|
| public default PathContainer subPath(int startIndex, int endIndex) Extract a sub-path from the given start offset into the element list (inclusive) and to the end offset (exclusive).
| |
| value | back to summary |
|---|---|
| public String value() The original path from which this instance was parsed. | |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| value | back to summary |
|---|---|
| public String value() The unmodified, original value of this element. | |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| public static final PathContainer. | HTTP_PATH
Options for HTTP URL paths. |
| public static final PathContainer. | MESSAGE_ROUTE
Options for a message route. |
| private final char |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PathContainer. | create(char
the separator for parsing the path into segments;
currently this must be slash or dot. separator, boolean whether to URL decode path segment
values and parse path parameters. If set to false, only escape
sequences for the separator char are decoded. decodeAndParseSegments)Create an |
| public char | |
| public boolean |
| decodeAndParseSegments | back to summary |
|---|---|
| private final boolean decodeAndParseSegments | |
| HTTP_PATH | back to summary |
|---|---|
| public static final PathContainer. Options for HTTP URL paths. Separator '/' with URL decoding and parsing of path parameters. | |
| MESSAGE_ROUTE | back to summary |
|---|---|
| public static final PathContainer. Options for a message route. Separator '.' with neither URL decoding nor parsing of path parameters. Escape sequences for the separator character in segment values are still decoded. | |
| separator | back to summary |
|---|---|
| private final char separator | |
| Options | back to summary |
|---|---|
| private Options(char separator, boolean decodeAndParseSegments) | |
| create | back to summary |
|---|---|
| public static PathContainer. Create an
| |
| separator | back to summary |
|---|---|
| public char separator() | |
| shouldDecodeAndParseSegments | back to summary |
|---|---|
| public boolean shouldDecodeAndParseSegments() | |
| Modifier and Type | Method and Description |
|---|---|
| public MultiValueMap | Returns: an unmodifiable map containing the parametersPath parameters associated with this path segment. |
| public String | |
| public char[] |
| parameters | back to summary |
|---|---|
| public MultiValueMap Path parameters associated with this path segment.
| |
| valueToMatch | back to summary |
|---|---|
| public String valueToMatch() Return the path segment value, decoded and sanitized, for path matching. | |
| valueToMatchAsChars | back to summary |
|---|---|
| public char[] valueToMatchAsChars() Expose | |