code: private static Map<String,String> getRankMap(Object[] params){
          if (params == null) {
              return null;
          }
          HashMap<String,String> result = new HashMap<>();
          for (int i = 0; i < params.length; i++) {
              String name = params[i] instanceof Parameter ?
                  ((Parameter) params[i]).name() :
                  ((TypeVariable) params[i]).typeName();
              result.put(name, String.valueOf(i));
          }
          return result;
      }
docs: Given an array of <code>Parameter</code>s, return
  a name/rank number map.  If the array is null, then
  null is returned.
  @param params The array of parmeters (from type or executable member) to
  check.
  @return a name-rank number map.