class CaptureTheRestPathElement extends PathElement
CaptureTheRestPathElement
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
variableName |
CAPTURE_VARIABLE_WEIGHT, next, NO_PARAMETERS, pos, prev, separator, WILDCARD_WEIGHT
Constructor and Description |
---|
CaptureTheRestPathElement(int pos,
char[] captureDescriptor,
char separator) |
Modifier and Type | Method and Description |
---|---|
int |
getCaptureCount()
Return the number of variables captured by the path element.
|
char[] |
getChars() |
int |
getNormalizedLength() |
int |
getWildcardCount()
Return the number of wildcard elements (*, ?) in the path element.
|
boolean |
matches(int pathIndex,
PathPattern.MatchingContext matchingContext)
Attempt to match this path element.
|
private java.lang.String |
pathToString(int fromSegment,
java.util.List<PathContainer.Element> pathElements) |
java.lang.String |
toString() |
getScore, isNoMorePattern
CaptureTheRestPathElement(int pos, char[] captureDescriptor, char separator)
pos
- position of the path element within the path pattern textcaptureDescriptor
- a character array containing contents like '{' '*' 'a' 'b' '}'separator
- the separator used in the path patternpublic boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext)
PathElement
matches
in class PathElement
pathIndex
- the current position within the candidate pathmatchingContext
- encapsulates context for the match including the candidatetrue
if it matches, otherwise false
private java.lang.String pathToString(int fromSegment, java.util.List<PathContainer.Element> pathElements)
public int getNormalizedLength()
getNormalizedLength
in class PathElement
public int getWildcardCount()
PathElement
getWildcardCount
in class PathElement
public int getCaptureCount()
PathElement
getCaptureCount
in class PathElement
public java.lang.String toString()
toString
in class java.lang.Object
public char[] getChars()
getChars
in class PathElement