Package io.microsphere.spring.core
Class MethodParameterUtils
- java.lang.Object
-
- io.microsphere.spring.core.MethodParameterUtils
-
- All Implemented Interfaces:
io.microsphere.util.Utils
public abstract class MethodParameterUtils extends java.lang.Object implements io.microsphere.util.UtilsThe utility class forMethodParameter- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
MethodParameter
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static intfindParameterIndex(java.lang.reflect.Parameter parameter)static org.springframework.core.MethodParameterforExecutable(java.lang.reflect.Executable executable, int parameterIndex)Create a new MethodParameter for the given method or constructor.static org.springframework.core.MethodParameterforParameter(java.lang.reflect.Parameter parameter)Create a new MethodParameter for the given parameter descriptor.
-
-
-
Method Detail
-
forParameter
public static org.springframework.core.MethodParameter forParameter(java.lang.reflect.Parameter parameter)
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(java.lang.reflect.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
protected static int findParameterIndex(java.lang.reflect.Parameter parameter)
-
-