Package org.springframework.web.servlet.handler

# Class RequestMatchResult

java.lang.Object
org.springframework.web.servlet.handler.RequestMatchResult

public class RequestMatchResult extends Object
Container for the result from request pattern matching via `MatchableHandlerMapping` with a method to further extract URI template variables from the pattern.

Since:
  4.3.1
Author:
  Rossen Stoyanchev

## Constructor Summary

Constructors
Constructor
Description
`RequestMatchResult(String pattern, String lookupPath, org.springframework.util.PathMatcher pathMatcher)`
Create an instance with the matched String pattern.
`RequestMatchResult(org.springframework.web.util.pattern.PathPattern pathPattern, org.springframework.http.server.PathContainer lookupPath)`
Create an instance with the matched `PathPattern`.

## Method Summary

Modifier and Type
Method
Description
`Map<String,String>`
`extractUriTemplateVariables()`
Extract URI template variables from the matching pattern as defined in `PathMatcher.extractUriTemplateVariables(java.lang.String, java.lang.String)`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RequestMatchResult

public RequestMatchResult(org.springframework.web.util.pattern.PathPattern pathPattern, org.springframework.http.server.PathContainer lookupPath)
Create an instance with the matched `PathPattern`.

Parameters:
  `pathPattern` - the pattern that was matched
  `lookupPath` - the mapping path
Since:
  5.3

### RequestMatchResult

public RequestMatchResult(String pattern, String lookupPath, org.springframework.util.PathMatcher pathMatcher)
Create an instance with the matched String pattern.

Parameters:
  `pattern` - the pattern that was matched, possibly with a '/' appended
  `lookupPath` - the mapping path
  `pathMatcher` - the PathMatcher instance used for the match

## Method Details

### extractUriTemplateVariables

public Map<String,String> extractUriTemplateVariables()
Extract URI template variables from the matching pattern as defined in `PathMatcher.extractUriTemplateVariables(java.lang.String, java.lang.String)`.

Returns:
  a map with URI template variables