code: public Signature replaceArg(String oldName, String newName, Class<?> newType) {
          int offset = argOffset(oldName);
          String[] newArgNames = argNames;
  
          if (!oldName.equals(newName)) {
              newArgNames = Arrays.copyOf(argNames, argNames.length);
              newArgNames[offset] = newName;
          }
  
          Class<?> oldType = methodType.parameterType(offset);
          MethodType newMethodType = methodType;
  
          if (!oldType.equals(newType)) newMethodType = methodType.changeParameterType(offset, newType);
  
          return new Signature(newMethodType, newArgNames);
      }
docs: Replace the named argument with a new name and type.
  
  @param oldName the old name of the argument
  @param newName the new name of the argument; can be the same as old
  @param newType the new type of the argument; can be the same as old
  @return a new signature with the modified argument