Package org.springframework.web.servlet.mvc.method.annotation

# Class MvcUriComponentsBuilder.MethodArgumentBuilder

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder.MethodArgumentBuilder

Enclosing class:
  MvcUriComponentsBuilder

public static class MvcUriComponentsBuilder.MethodArgumentBuilder extends Object
Builder class to create URLs for method arguments.

## Constructor Summary

Constructors
Constructor
Description
`MethodArgumentBuilder(Class<?> controllerType, Method method)`
Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.
`MethodArgumentBuilder(org.springframework.web.util.UriComponentsBuilder baseUrl, Class<?> controllerType, Method method)`
Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.

## Method Summary

Modifier and Type
Method
Description
`MvcUriComponentsBuilder.MethodArgumentBuilder`
`arg(int index, Object value)`
`String`
`build()`
`String`
`buildAndExpand(Object... uriVars)`
`MvcUriComponentsBuilder.MethodArgumentBuilder`
`encode()`
Use this method only if you need to apply strong encoding to expanded URI variables by quoting all characters with reserved meaning.

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

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

## Constructor Details

### MethodArgumentBuilder

public MethodArgumentBuilder(Class<?> controllerType, Method method)
Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.

Since:
  4.2

### MethodArgumentBuilder

public MethodArgumentBuilder(@Nullable org.springframework.web.util.UriComponentsBuilder baseUrl, Class<?> controllerType, Method method)
Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.

Since:
  4.2

## Method Details

### arg

public MvcUriComponentsBuilder.MethodArgumentBuilder arg(int index, Object value)

### encode

public MvcUriComponentsBuilder.MethodArgumentBuilder encode()
Use this method only if you need to apply strong encoding to expanded URI variables by quoting all characters with reserved meaning.

Since:
  5.0.8

### build

public String build()

### buildAndExpand

public String buildAndExpand(Object... uriVars)