code: public static Field getDeclaredField(Class<?> clz, final String fieldName) {
      for (Class<?> s = clz; s != Object.class; s = s.getSuperclass()) {
        try {
          return s.getDeclaredField(fieldName);
        } catch (NoSuchFieldException ignored) {
        }
      }
      return null;
    }
docs: 循环向上转型,获取类对象的DeclaredField.