code: public static void copyFromTo(Object from, Object to, String fieldName) {
  
          if (from == null || to == null) {
              log.info("object deep copy : from or to is null ");
              return;
          }
  
          try {
              Method getter = getGetterMethod(from.getClass(), fieldName);
  
              if (getter == null) {
                  //log.info("getter method not found : " + fieldName);
                  return;
              }
  
              Method setter = getSetterMethod(to.getClass(), fieldName, getter.getReturnType());
              if (setter == null) {
                  //log.info("setter method not found : " + fieldName);
                  return;
              }
  
              setter.invoke(to, getter.invoke(from, EMPTY_CLASS));
  
          } catch (IllegalAccessException | InvocationTargetException e) {
              log.info("set method invoke error : " + fieldName);
          }
      }
docs: Copy from to.
  
  @param from      the from
  @param to        the to
  @param fieldName the field name