Package io.microsphere.spring.core
Class MethodParameterUtils
java.lang.Object
io.microsphere.spring.core.MethodParameterUtils
- All Implemented Interfaces:
io.microsphere.util.Utils
The utility class for
MethodParameter- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
MethodParameter
-
Method Summary
Modifier and TypeMethodDescriptionprotected static intfindParameterIndex(Parameter parameter) static org.springframework.core.MethodParameterforExecutable(Executable executable, int parameterIndex) Create a new MethodParameter for the given method or constructor.static org.springframework.core.MethodParameterforParameter(Parameter parameter) Create a new MethodParameter for the given parameter descriptor.
-
Method Details
-
forParameter
Create a new MethodParameter for the given parameter descriptor.This is a convenience factory method for scenarios where a Java 8
Parameterdescriptor is already available.- Parameters:
parameter- the parameter descriptor- Returns:
- the corresponding MethodParameter instance
- Since:
- Spring Framework 5.0
- See Also:
-
MethodParameter.forParameter(Parameter)
-
forExecutable
public static org.springframework.core.MethodParameter forExecutable(Executable executable, int parameterIndex) Create a new MethodParameter for the given method or constructor.This is a convenience factory method for scenarios where a Method or Constructor reference is treated in a generic fashion.
- Parameters:
executable- the Method or Constructor to specify a parameter forparameterIndex- the index of the parameter- Returns:
- the corresponding MethodParameter instance
- Since:
- Spring Framework 5.0
-
findParameterIndex
-