code: private static Class getGenericParameterType(MethodParameter methodParam, int typeIndex) {
         return toClass(extractType(methodParam, getTargetType(methodParam), typeIndex, methodParam.getNestingLevel()));
     }
docs: Extract the generic parameter type from the given method or constructor.
  @param methodParam the method parameter specification
  @param typeIndex the index of the type (e.g. 0 for Collections,
  0 for Map keys, 1 for Map values)
  @return the generic type, or <code>null</code> if none