org.springframework.web.method

## Class HandlerMethod.HandlerMethodParameter

- java.lang.Object
- - org.springframework.core.MethodParameter
  - - org.springframework.core.annotation.SynthesizingMethodParameter
    - - org.springframework.web.method.HandlerMethod.HandlerMethodParameter

- Enclosing class:
    HandlerMethod

      protected class HandlerMethod.HandlerMethodParameter
      extends SynthesizingMethodParameter

  A MethodParameter with HandlerMethod-specific behavior.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `HandlerMethodParameter(HandlerMethod.HandlerMethodParameter original)`
    `` | `HandlerMethodParameter(int index)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HandlerMethod.HandlerMethodParameter` | `clone()`
    `Class<?>` | `getContainingClass()` Return the containing class for this method parameter.
    `Method` | `getMethod()` Return the wrapped Method, if any.
    `<T extends Annotation> T` | `getMethodAnnotation(Class<T> annotationType)` Return the method/constructor annotation of the given type, if available.
    `Annotation[]` | `getParameterAnnotations()` Return the annotations associated with the specific method/constructor parameter.
    `<T extends Annotation> boolean` | `hasMethodAnnotation(Class<T> annotationType)` Return whether the method/constructor is annotated with the given type.

    - ### Methods inherited from class org.springframework.core.annotation.SynthesizingMethodParameter

      `adaptAnnotation, adaptAnnotationArray, forExecutable, forParameter`

    - ### Methods inherited from class org.springframework.core.MethodParameter

      `decreaseNestingLevel, equals, findParameterIndex, forMethodOrConstructor, getAnnotatedElement, getConstructor, getDeclaringClass, getExecutable, getGenericParameterType, getMember, getMethodAnnotations, getNestedGenericParameterType, getNestedParameterType, getNestingLevel, getParameter, getParameterAnnotation, getParameterIndex, getParameterName, getParameterType, getTypeIndexForCurrentLevel, getTypeIndexForLevel, hashCode, hasParameterAnnotation, hasParameterAnnotations, increaseNestingLevel, initParameterNameDiscovery, isOptional, nested, nested, nestedIfOptional, setTypeIndexForCurrentLevel, toString, withContainingClass, withTypeIndex`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### HandlerMethodParameter

          public HandlerMethodParameter(int index)

    - #### HandlerMethodParameter

          protected HandlerMethodParameter(HandlerMethod.HandlerMethodParameter original)

  - ### Method Detail

    - #### getMethod

          @NonNull
          public Method getMethod()

      Description copied from class: `MethodParameter`
      Return the wrapped Method, if any.

      Note: Either Method or Constructor is available.

      Overrides:
        `getMethod` in class `MethodParameter`
      Returns:
        the Method, or `null` if none

    - #### getContainingClass

          public Class<?> getContainingClass()

      Description copied from class: `MethodParameter`
      Return the containing class for this method parameter.
      Overrides:
        `getContainingClass` in class `MethodParameter`
      Returns:
        a specific containing class (potentially a subclass of the declaring class), or otherwise simply the declaring class itself
      See Also:
        `MethodParameter.getDeclaringClass()`

    - #### getMethodAnnotation

          public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType)

      Description copied from class: `MethodParameter`
      Return the method/constructor annotation of the given type, if available.
      Overrides:
        `getMethodAnnotation` in class `MethodParameter`
      Parameters:
        `annotationType` - the annotation type to look for
      Returns:
        the annotation object, or `null` if not found

    - #### hasMethodAnnotation

          public <T extends Annotation> boolean hasMethodAnnotation(Class<T> annotationType)

      Description copied from class: `MethodParameter`
      Return whether the method/constructor is annotated with the given type.
      Overrides:
        `hasMethodAnnotation` in class `MethodParameter`
      Parameters:
        `annotationType` - the annotation type to look for
      See Also:
        `MethodParameter.getMethodAnnotation(Class)`

    - #### getParameterAnnotations

          public Annotation[] getParameterAnnotations()

      Description copied from class: `MethodParameter`
      Return the annotations associated with the specific method/constructor parameter.
      Overrides:
        `getParameterAnnotations` in class `MethodParameter`

    - #### clone

          public HandlerMethod.HandlerMethodParameter clone()

      Overrides:
        `clone` in class `SynthesizingMethodParameter`