public static MethodParameter createMethodParameter ( Executable executable , int i ) { MethodParameter methodParameter ; if ( executable instanceof Method ) { methodParameter = new MethodParameter ( ( Method ) executable , i ) ; } else if ( executable instanceof Constructor ) { methodParameter = new MethodParameter ( ( Constructor ) executable , i ) ; } else { throw new IllegalArgumentException ( "Unsupported Executable: " + executable ) ; } methodParameter . initParameterNameDiscovery ( new DefaultParameterNameDiscoverer ( ) ) ; return methodParameter ; }
Return a properly initialized MethodParameter for the given executable and index .