Class MethodParameterUtils

java.lang.Object
io.microsphere.spring.core.MethodParameterUtils
All Implemented Interfaces:
io.microsphere.util.Utils

public abstract class MethodParameterUtils extends Object implements io.microsphere.util.Utils
The utility class for MethodParameter
Since:
1.0.0
Author:
Mercy
See Also:
  • MethodParameter
  • Method Details

    • forParameter

      public static org.springframework.core.MethodParameter forParameter(Parameter parameter)
      Create a new MethodParameter for the given parameter descriptor.

      This is a convenience factory method for scenarios where a Java 8 Parameter descriptor 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 for
      parameterIndex - the index of the parameter
      Returns:
      the corresponding MethodParameter instance
      Since:
      Spring Framework 5.0
    • findParameterIndex

      protected static int findParameterIndex(Parameter parameter)