We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4 反射获取类中的字段 中 这里需要注意的是 getDeclaredMethod 和 getDeclaredMethods 包含 private、protected、default、public 的函数,并且通过这两个函数获取到的只是在自身中定义的函数,从父类中集成的函数不能够获取到。而 getMethod 和 getMethods 只包含 public 函数,父类中的公有函数也能够获取到。
应该为getDeclaredField 、getDeclaredFields 、getField 、getFields。
The text was updated successfully, but these errors were encountered:
field是获取成员变量吧
Sorry, something went wrong.
感谢反馈,这篇文章还没完全审核结束,晚点我看下。另外有问题也可以直接提交 PR
已修改
No branches or pull requests
4 反射获取类中的字段 中
这里需要注意的是 getDeclaredMethod 和 getDeclaredMethods 包含 private、protected、default、public 的函数,并且通过这两个函数获取到的只是在自身中定义的函数,从父类中集成的函数不能够获取到。而 getMethod 和 getMethods 只包含 public 函数,父类中的公有函数也能够获取到。
应该为getDeclaredField 、getDeclaredFields 、getField 、getFields。
The text was updated successfully, but these errors were encountered: