Top Description Fields Constructors Methods
org.springframework.web.servlet.handler

public Class RequestMatchResult

extends Object
Class Inheritance
Imports
java.util.Map, org.springframework.http.server.PathContainer, org.springframework.lang.Nullable, org.springframework.util.Assert, .PathMatcher, org.springframework.web.util.pattern.PathPattern

Container for the result from request pattern matching via MatchableHandlerMapping with a method to further extract URI template variables from the pattern.
Author
Rossen Stoyanchev
Since
4.3.1

Field Summary

Modifier and TypeField and Description
private final String
private final PathContainer
private final PathMatcher
private final PathPattern
private final String

Constructor Summary

AccessConstructor and Description
public
RequestMatchResult(PathPattern
the pattern that was matched
pathPattern
,
PathContainer
the mapping path
lookupPath
)

Create an instance with the matched PathPattern.

public
RequestMatchResult(String
the pattern that was matched, possibly with a '/' appended
pattern
,
String
the mapping path
lookupPath
,
PathMatcher
the PathMatcher instance used for the match
pathMatcher
)

Create an instance with the matched String pattern.

Method Summary

Modifier and TypeMethod and Description
public Map<String, String>

Returns:

a map with URI template variables
extractUriTemplateVariables
()

Extract URI template variables from the matching pattern as defined in PathMatcher#extractUriTemplateVariables.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lookupPathback to summary
private final String lookupPath
Annotations
@Nullable
lookupPathContainerback to summary
private final PathContainer lookupPathContainer
Annotations
@Nullable
pathMatcherback to summary
private final PathMatcher pathMatcher
Annotations
@Nullable
pathPatternback to summary
private final PathPattern pathPattern
Annotations
@Nullable
patternback to summary
private final String pattern
Annotations
@Nullable

Constructor Detail

RequestMatchResultback to summary
public RequestMatchResult(PathPattern pathPattern, PathContainer lookupPath)

Create an instance with the matched PathPattern.

Parameters
pathPattern:PathPattern

the pattern that was matched

lookupPath:PathContainer

the mapping path

Since
5.3
RequestMatchResultback to summary
public RequestMatchResult(String pattern, String lookupPath, PathMatcher pathMatcher)

Create an instance with the matched String pattern.

Parameters
pattern:String

the pattern that was matched, possibly with a '/' appended

lookupPath:String

the mapping path

pathMatcher:PathMatcher

the PathMatcher instance used for the match

Method Detail

extractUriTemplateVariablesback to summary
public Map<String, String> extractUriTemplateVariables()

Extract URI template variables from the matching pattern as defined in PathMatcher#extractUriTemplateVariables.

Returns:Map<String, String>

a map with URI template variables

Annotations
@SuppressWarnings:ConstantConditions