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 and Description
    `MethodArgumentBuilder(Class<?> controllerType, Method method)` Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.
    `MethodArgumentBuilder(UriComponentsBuilder baseUrl, Class<?> controllerType, Method method)` Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### MethodArgumentBuilder

          public MethodArgumentBuilder(Class<?> controllerType,
                                       Method method)

      Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.
      Since:
        4.2

    - #### MethodArgumentBuilder

          public MethodArgumentBuilder(@Nullable
                                       UriComponentsBuilder baseUrl,
                                       Class<?> controllerType,
                                       Method method)

      Create a new `MvcUriComponentsBuilder.MethodArgumentBuilder` instance.
      Since:
        4.2

  - ### Method Detail

    - #### 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)