public class UriTemplatePathSpec extends AbstractPathSpec
| Constructor and Description |
|---|
UriTemplatePathSpec(java.lang.String rawSpec) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PathSpec other) |
java.lang.String |
getDeclaration()
The as-provided path spec.
|
PathSpecGroup |
getGroup()
The spec group.
|
protected java.util.regex.Matcher |
getMatcher(java.lang.String path) |
int |
getPathDepth()
Get the number of path elements that this path spec declares.
|
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.util.Map<java.lang.String,java.lang.String> |
getPathParams(java.lang.String path) |
java.util.regex.Pattern |
getPattern() |
java.lang.String |
getPrefix()
A simple prefix match for the pathspec or null
|
int |
getSpecLength()
The length of the spec.
|
java.lang.String |
getSuffix()
A simple suffix match for the pathspec or null
|
int |
getVariableCount() |
java.lang.String[] |
getVariables() |
boolean |
matches(java.lang.String path)
Test to see if the provided path matches this path spec
|
equals, hashCode, toStringpublic int compareTo(PathSpec other)
compareTo in interface java.lang.Comparable<PathSpec>compareTo in class AbstractPathSpecpublic java.util.Map<java.lang.String,java.lang.String> getPathParams(java.lang.String path)
protected java.util.regex.Matcher getMatcher(java.lang.String path)
public int getSpecLength()
PathSpecpublic PathSpecGroup getGroup()
PathSpecpublic int getPathDepth()
PathSpecThis is used to determine longest match logic.
public java.lang.String getPathInfo(java.lang.String path)
PathSpecpath - the path to match againstpublic java.lang.String getPathMatch(java.lang.String path)
PathSpecpath - the path to match againstpublic java.lang.String getDeclaration()
PathSpecpublic java.lang.String getPrefix()
PathSpecpublic java.lang.String getSuffix()
PathSpecpublic java.util.regex.Pattern getPattern()
public boolean matches(java.lang.String path)
PathSpecpath - the path to testpublic int getVariableCount()
public java.lang.String[] getVariables()
Copyright © 1995–2021 Webtide. All rights reserved.