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");
我正在尝试将给定字段与模型Header中的其他字段进行比较。Alarm正如您在代码中看到的,我通过 3 个不同的步骤过滤警报。前 2 个工作完美。但是,最后一个不起作用。它说:
Header
Alarm
undefined method `wh