src/main/java/me/zzp/ar/Table.java
public Table extend(Object bean) {
    Class<?> type = bean.getClass();
    for (Method method : type.getDeclaredMethods()) {
      Class<?> returnType = method.getReturnType();
      Class<?>[] params = method.getParameterTypes();
      String key = method.getName();

      if (params.length == 2
          && key.length() > 3
          && (key.startsWith("get") || key.startsWith("set"))
          && params[0].isAssignableFrom(Record.class)
          && params[1].isAssignableFrom(Object.class)
          && Object.class.isAssignableFrom(returnType)) {
        key = key.replaceAll("(?=[A-Z])", "_").toLowerCase();
        hooks.put(key, new Lambda(bean, method));
      }
    }

    return this;
  }
public Table extend(Object bean) {
    Class<?> type = bean.getClass();
    for (Method method : type.getDeclaredMethods()) {
      Class<?> returnType = method.getReturnType();
      Class<?>[] params = method.getParameterTypes();
      String key = method.getName();

      if (params.length == 2
          && key.length() > 3
          && (key.startsWith("get") || key.startsWith("set"))
          && params[0].isAssignableFrom(Record.class)
          && params[1].isAssignableFrom(Object.class)
          && Object.class.isAssignableFrom(returnType)) {
        key = key.replaceAll("(?=[A-Z])", "_").toLowerCase();
        hooks.put(key, new Lambda(bean, method));
      }
    }

    return this;
  }
继承给定的JavaBean，扩展Record对象的get和set方法。

@param bean 希望被继承的JavaBean
@return 返回Table自身
@since 2.3