# Uses of Class
org.springframework.core.MethodParameter

Packages that use MethodParameter
Package
Description
org.springframework.core
Provides basic classes for exception handling and version detection, and other core helpers that are not specific to any part of the framework.
org.springframework.core.annotation
Core support package for annotations, meta-annotations, and merged annotations with attribute overrides.
org.springframework.core.convert
Type conversion system API.

## Uses of MethodParameter in org.springframework.core

Methods in org.springframework.core that return MethodParameter
Modifier and Type
Method
Description
`MethodParameter`
MethodParameter.`clone()`
`static MethodParameter`
MethodParameter.`forExecutable(Executable executable, int parameterIndex)`
Create a new MethodParameter for the given method or constructor.
`static MethodParameter`
MethodParameter.`forFieldAwareConstructor(Constructor<?> ctor, int parameterIndex, String fieldName)`
Create a new MethodParameter for the given field-aware constructor, for example, on a data class or record type.
`static MethodParameter`
MethodParameter.`forMethodOrConstructor(Object methodOrConstructor, int parameterIndex)`
Deprecated.
as of 5.0, in favor of `forExecutable(java.lang.reflect.Executable, int)`
`static MethodParameter`
MethodParameter.`forParameter(Parameter parameter)`
Create a new MethodParameter for the given parameter descriptor.
`MethodParameter`
MethodParameter.`nested()`
Return a variant of this `MethodParameter` which points to the same parameter but one nesting level deeper.
`MethodParameter`
MethodParameter.`nested(Integer typeIndex)`
Return a variant of this `MethodParameter` which points to the same parameter but one nesting level deeper.
`MethodParameter`
MethodParameter.`nestedIfOptional()`
Return a variant of this `MethodParameter` which points to the same parameter but one nesting level deeper in case of a `Optional` declaration.
`MethodParameter`
MethodParameter.`withContainingClass(Class<?> containingClass)`
Return a variant of this `MethodParameter` which refers to the given containing class.
`MethodParameter`
MethodParameter.`withTypeIndex(int typeIndex)`
Return a variant of this `MethodParameter` with the type for the current level set to the specified value.
Methods in org.springframework.core with parameters of type MethodParameter
Modifier and Type
Method
Description
`static ResolvableType`
ResolvableType.`forMethodParameter(MethodParameter methodParameter)`
Return a `ResolvableType` for the specified `MethodParameter`.
`static ResolvableType`
ResolvableType.`forMethodParameter(MethodParameter methodParameter, Type targetType)`
Return a `ResolvableType` for the specified `MethodParameter`, overriding the target type to resolve with a specific given type.
`static ResolvableType`
ResolvableType.`forMethodParameter(MethodParameter methodParameter, ResolvableType implementationType)`
Return a `ResolvableType` for the specified `MethodParameter` with a given implementation type.
`static String`
Conventions.`getVariableNameForParameter(MethodParameter parameter)`
Determine the conventional variable name for the given parameter taking the generic collection type, if any, into account.
`static Class<?>`
GenericTypeResolver.`resolveParameterType(MethodParameter methodParameter, Class<?> implementationClass)`
Deprecated.
since 5.2 in favor of `methodParameter.withContainingClass(implementationClass).getParameterType()`
Constructors in org.springframework.core with parameters of type MethodParameter
Modifier
Constructor
Description
``
`MethodParameter(MethodParameter original)`
Copy constructor, resulting in an independent MethodParameter object based on the same metadata and cache state that the original object was in.

## Uses of MethodParameter in org.springframework.core.annotation

Subclasses of MethodParameter in org.springframework.core.annotation
Modifier and Type
Class
Description
`protected class`
`AnnotatedMethod.AnnotatedMethodParameter`
A MethodParameter with AnnotatedMethod-specific behavior.
`class`
`SynthesizingMethodParameter`
A `MethodParameter` variant which synthesizes annotations that declare attribute aliases via `@AliasFor`.
Methods in org.springframework.core.annotation that return MethodParameter
Modifier and Type
Method
Description
`final MethodParameter[]`
AnnotatedMethod.`getMethodParameters()`
Return the method parameters for this `AnnotatedMethod`.
`MethodParameter`
AnnotatedMethod.`getReturnType()`
Return a `MethodParameter` for the declared return type.
`MethodParameter`
AnnotatedMethod.`getReturnValueType(Object returnValue)`
Return a `MethodParameter` for the actual return value type.
Methods in org.springframework.core.annotation with parameters of type MethodParameter
Modifier and Type
Method
Description
`protected static Object`
AnnotatedMethod.`findProvidedArgument(MethodParameter parameter, Object... providedArgs)`
`protected static String`
AnnotatedMethod.`formatArgumentError(MethodParameter param, String message)`

## Uses of MethodParameter in org.springframework.core.convert

Methods in org.springframework.core.convert with parameters of type MethodParameter
Modifier and Type
Method
Description
`static TypeDescriptor`
TypeDescriptor.`nested(MethodParameter methodParameter, int nestingLevel)`
Create a type descriptor for a nested type declared within the method parameter.
Constructors in org.springframework.core.convert with parameters of type MethodParameter
Modifier
Constructor
Description
``
`TypeDescriptor(MethodParameter methodParameter)`
Create a new type descriptor from a `MethodParameter`.