Top Description Fields Constructors Methods
org.springframework.web.util.pattern

pack-priv Class SeparatorPathElement

extends PathElement
Class Inheritance
Imports
org.springframework.web.util.pattern.PathPattern.MatchingContext

A separator path element. In the pattern '/foo/bar' the two occurrences of '/' will be represented by a SeparatorPathElement (if the default separator of '/' is being used).
Author
Andy Clement
Since
5.0

Field Summary

Inherited from org.springframework.web.util.pattern.PathElement:
CAPTURE_VARIABLE_WEIGHTnextNO_PARAMETERSposprevseparatorWILDCARD_WEIGHT

Constructor Summary

AccessConstructor and Description
pack-priv
SeparatorPathElement(int pos, char separator)

Method Summary

Modifier and TypeMethod and Description
public char[]
public int
getNormalizedLength()

Implements abstract org.springframework.web.util.pattern.PathElement.getNormalizedLength.

Return the length of the path element where captures are considered to be one character long.
public boolean
isLiteral()

Overrides org.springframework.web.util.pattern.PathElement.isLiteral.

Return whether this PathElement can be strictly compared against another element for matching.
public boolean
matches(int
the current position within the candidate path
pathIndex
,
PathPattern.MatchingContext
encapsulates context for the match including the candidate
matchingContext
)

Implements abstract org.springframework.web.util.pattern.PathElement.matches.

Matching a separator is easy, basically the character at candidateIndex must be the separator.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.springframework.web.util.pattern.PathElement:
getCaptureCountgetScoregetWildcardCountisNoMorePattern

Constructor Detail

SeparatorPathElementback to summary
pack-priv SeparatorPathElement(int pos, char separator)

Method Detail

getCharsback to summary
public char[] getChars()

Implements abstract org.springframework.web.util.pattern.PathElement.getChars.

Annotations
@Override
getNormalizedLengthback to summary
public int getNormalizedLength()

Implements abstract org.springframework.web.util.pattern.PathElement.getNormalizedLength.

Doc from org.springframework.web.util.pattern.PathElement.getNormalizedLength.

Return the length of the path element where captures are considered to be one character long.

Returns:int

the normalized length

Annotations
@Override
isLiteralback to summary
public boolean isLiteral()

Overrides org.springframework.web.util.pattern.PathElement.isLiteral.

Doc from org.springframework.web.util.pattern.PathElement.isLiteral.

Return whether this PathElement can be strictly compared against another element for matching.

Annotations
@Override
matchesback to summary
public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext)

Implements abstract org.springframework.web.util.pattern.PathElement.matches.

Matching a separator is easy, basically the character at candidateIndex must be the separator.

Parameters
pathIndex:int

Doc from org.springframework.web.util.pattern.PathElement.matches.

the current position within the candidate path

matchingContext:PathPattern.MatchingContext

Doc from org.springframework.web.util.pattern.PathElement.matches.

encapsulates context for the match including the candidate

Returns:boolean

Doc from org.springframework.web.util.pattern.PathElement.matches.

true if it matches, otherwise false

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override