Class MethodParameterUtils


  • public abstract class MethodParameterUtils
    extends io.microsphere.util.BaseUtils
    The utility class for MethodParameter
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    MethodParameter
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static int findParameterIndex​(java.lang.reflect.Parameter parameter)  
      static org.springframework.core.MethodParameter forExecutable​(java.lang.reflect.Executable executable, int parameterIndex)
      Create a new MethodParameter for the given method or constructor.
      static org.springframework.core.MethodParameter forParameter​(java.lang.reflect.Parameter parameter)
      Create a new MethodParameter for the given parameter descriptor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MethodParameterUtils

        public MethodParameterUtils()
    • 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 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​(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 for
        parameterIndex - 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)