Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以将Class属性转换为适当的Field 类吗?
Class
Field
例如考虑以下代码:
class Test { Integer A; void init() { Field fA = ???; } }
我想fA描述一下Test.A。
fA
Test.A
Field fA = Test.class.getDeclaredField("A");