使用java反射API访问私有对象

使用java反射API访问私有对象

问题描述:

我可以使用java反射访问并获取对象的值

Can I access and get the value of object using java reflection

是获取--getLong,getInt的方法,但我找不到getObject()

ther is method to get --getLong,getInt ,but I couldn't find getObject()

您是否正在寻找 Field.get(Object obj)

Are you looking for simply Field.get(Object obj)?