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

pack-priv Class SingleCharWildcardedPathElement

extends PathElement
Class Inheritance
Imports
org.springframework.http.server.PathContainer.Element, .PathContainer.PathSegment, org.springframework.web.util.pattern.PathPattern.MatchingContext

A literal path element that includes the single character wildcard '?' one or more times (to basically many any character at that position).
Author
Andy Clement
Since
5.0

Field Summary

Modifier and TypeField and Description
private final boolean
private final int
private final int
private final char[]
Inherited from org.springframework.web.util.pattern.PathElement:
CAPTURE_VARIABLE_WEIGHTnextNO_PARAMETERSposprevseparatorWILDCARD_WEIGHT

Constructor Summary

AccessConstructor and Description
public
SingleCharWildcardedPathElement(int pos, char[] literalText, int questionMarkCount, boolean caseSensitive, 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 int
getWildcardCount()

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

Return the number of wildcard elements (*, ?) in the path element.

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.

Attempt to match this path element.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

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

Field Detail

caseSensitiveback to summary
private final boolean caseSensitive
lenback to summary
private final int len
questionMarkCountback to summary
private final int questionMarkCount
textback to summary
private final char[] text

Constructor Detail

SingleCharWildcardedPathElementback to summary
public SingleCharWildcardedPathElement(int pos, char[] literalText, int questionMarkCount, boolean caseSensitive, 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
getWildcardCountback to summary
public int getWildcardCount()

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

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

Return the number of wildcard elements (*, ?) in the path element.

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

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

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

Attempt to match this path element.

Parameters
pathIndex:int

the current position within the candidate path

matchingContext:PathPattern.MatchingContext

encapsulates context for the match including the candidate

Returns:boolean

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. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override